mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Merge remote-tracking branch 'origin/GP-2592_ghidra1_ElfMipsGotMarkup'
(Closes #4602)
This commit is contained in:
commit
e79bd65944
2 changed files with 6 additions and 2 deletions
|
@ -589,6 +589,9 @@ public class ElfDefaultGotPltMarkup {
|
||||||
* @param data program data
|
* @param data program data
|
||||||
*/
|
*/
|
||||||
public static void setConstant(Data data) {
|
public static void setConstant(Data data) {
|
||||||
|
if (data == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Memory memory = data.getProgram().getMemory();
|
Memory memory = data.getProgram().getMemory();
|
||||||
MemoryBlock block = memory.getBlock(data.getAddress());
|
MemoryBlock block = memory.getBlock(data.getAddress());
|
||||||
if (!block.isWrite() || block.getName().startsWith(ElfSectionHeaderConstants.dot_got)) {
|
if (!block.isWrite() || block.getName().startsWith(ElfSectionHeaderConstants.dot_got)) {
|
||||||
|
|
|
@ -830,11 +830,12 @@ public class MIPS_ElfExtension extends ElfExtension {
|
||||||
|
|
||||||
long imageShift = elfLoadHelper.getImageBaseWordAdjustmentOffset();
|
long imageShift = elfLoadHelper.getImageBaseWordAdjustmentOffset();
|
||||||
|
|
||||||
// process local symbol got entries
|
// process global dynamic symbol got entries
|
||||||
int gotEntryIndex = 1;
|
int gotEntryIndex = 1;
|
||||||
for (int i = 0; i < gotSymbolIndex; i++) {
|
for (int i = 0; i < gotSymbolIndex; i++) {
|
||||||
monitor.checkCanceled();
|
monitor.checkCanceled();
|
||||||
if (!elfSymbols[i].isFunction() || elfSymbols[i].getSectionHeaderIndex() != 0) {
|
if (!elfSymbols[i].isFunction() || !elfSymbols[i].isGlobal() ||
|
||||||
|
elfSymbols[i].getSectionHeaderIndex() != 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Address gotEntryAddr = adjustTableEntryIfNonZero(mipsPltgotBase, ++gotEntryIndex,
|
Address gotEntryAddr = adjustTableEntryIfNonZero(mipsPltgotBase, ++gotEntryIndex,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue