mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/GP-4884_ryanmkurtz_omf'
(Closes #6862)
This commit is contained in:
commit
916c0bbf10
1 changed files with 17 additions and 4 deletions
|
@ -37,7 +37,8 @@ public class OmfFileHeader extends OmfRecord {
|
||||||
private List<OmfSegmentHeader> segments = new ArrayList<>();
|
private List<OmfSegmentHeader> segments = new ArrayList<>();
|
||||||
private List<OmfGroupRecord> groups = new ArrayList<>();
|
private List<OmfGroupRecord> groups = new ArrayList<>();
|
||||||
private List<OmfExternalSymbol> externsymbols = new ArrayList<>();
|
private List<OmfExternalSymbol> externsymbols = new ArrayList<>();
|
||||||
private List<OmfSymbolRecord> symbols = new ArrayList<>();
|
private List<OmfSymbolRecord> publicSymbols = new ArrayList<>();
|
||||||
|
private List<OmfSymbolRecord> localSymbols = new ArrayList<>();
|
||||||
private List<OmfFixupRecord> fixup = new ArrayList<>();
|
private List<OmfFixupRecord> fixup = new ArrayList<>();
|
||||||
private List<OmfSegmentHeader> extraSeg = null; // Holds implied segments that don't have official header record
|
private List<OmfSegmentHeader> extraSeg = null; // Holds implied segments that don't have official header record
|
||||||
// private OmfModuleEnd endModule = null;
|
// private OmfModuleEnd endModule = null;
|
||||||
|
@ -128,10 +129,17 @@ public class OmfFileHeader extends OmfRecord {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the list of symbols exported by this file
|
* @return the list of public symbols exported by this file
|
||||||
*/
|
*/
|
||||||
public List<OmfSymbolRecord> getPublicSymbols() {
|
public List<OmfSymbolRecord> getPublicSymbols() {
|
||||||
return symbols;
|
return publicSymbols;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the list of local symbols in this file
|
||||||
|
*/
|
||||||
|
public List<OmfSymbolRecord> getLocalSymbols() {
|
||||||
|
return localSymbols;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -371,7 +379,12 @@ public class OmfFileHeader extends OmfRecord {
|
||||||
header.externsymbols.add(external);
|
header.externsymbols.add(external);
|
||||||
}
|
}
|
||||||
else if (record instanceof OmfSymbolRecord symbol) {
|
else if (record instanceof OmfSymbolRecord symbol) {
|
||||||
header.symbols.add(symbol);
|
if (symbol.isStatic()) {
|
||||||
|
header.localSymbols.add(symbol);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
header.publicSymbols.add(symbol);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (record instanceof OmfNamesRecord names) {
|
else if (record instanceof OmfNamesRecord names) {
|
||||||
names.appendNames(header.nameList); // Keep names, otherwise don't save record
|
names.appendNames(header.nameList); // Keep names, otherwise don't save record
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue