mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-25 21:51:47 +00:00
GP-1160: MzLoader now populates relocation table
This commit is contained in:
parent
19fa121b30
commit
0640544b62
@ -134,8 +134,8 @@ public class MzLoader extends AbstractLibrarySupportLoader {
|
||||
}
|
||||
monitor.setMessage("Setting registers...");
|
||||
|
||||
Symbol entrySymbol =
|
||||
SymbolUtilities.getLabelOrFunctionSymbol(prog, ENTRY_NAME, err -> log.error("MZ", err));
|
||||
Symbol entrySymbol = SymbolUtilities.getLabelOrFunctionSymbol(prog, ENTRY_NAME,
|
||||
err -> log.appendMsg("MZ", err));
|
||||
setRegisters(context, entrySymbol, memory.getBlocks(), dos);
|
||||
|
||||
}
|
||||
@ -375,6 +375,11 @@ public class MzLoader extends AbstractLibrarySupportLoader {
|
||||
int value = Conv.shortToInt(reader.readShort(locOffset));
|
||||
int fixupAddrSeg = (value + csStart) & Conv.SHORT_MASK;
|
||||
mem.setShort(fixupAddr, (short) fixupAddrSeg);
|
||||
|
||||
// Add to relocation table
|
||||
prog.getRelocationTable()
|
||||
.add(fixupAddr, 0, new long[] { off, seg }, converter.getBytes(value),
|
||||
null);
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user