mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 11:55:59 +08:00
GP-2744 corrected ELF issue with missing entry symbol
This commit is contained in:
@@ -2166,13 +2166,16 @@ class ElfProgramBuilder extends MemorySectionResolver implements ElfLoadHelper {
|
|||||||
if (isEntry) {
|
if (isEntry) {
|
||||||
program.getSymbolTable().addExternalEntryPoint(address);
|
program.getSymbolTable().addExternalEntryPoint(address);
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isEmpty(name)) {
|
||||||
|
name = null;
|
||||||
|
}
|
||||||
FunctionManager functionMgr = program.getFunctionManager();
|
FunctionManager functionMgr = program.getFunctionManager();
|
||||||
function = functionMgr.getFunctionAt(address);
|
function = functionMgr.getFunctionAt(address);
|
||||||
if (function == null) {
|
if (function == null) {
|
||||||
function = functionMgr.createFunction(null, address, new AddressSet(address),
|
function = functionMgr.createFunction(name, address, new AddressSet(address),
|
||||||
SourceType.IMPORTED);
|
SourceType.IMPORTED);
|
||||||
}
|
}
|
||||||
else if (!StringUtils.isEmpty(name)) {
|
else if (name != null) {
|
||||||
createSymbol(address, name, true, false, null);
|
createSymbol(address, name, true, false, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user