diff options
| author | Josh Ferrell <josh@vector35.com> | 2025-12-09 13:28:50 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2025-12-09 13:28:50 -0500 |
| commit | e4dc9f370f948bf8071e38667fc9606f13ea0f70 (patch) | |
| tree | 8015642e9e69ffb80d637a0ffbe55421e3bba874 /plugins | |
| parent | 41497526378568c17c4340f6a523a696920c2d1a (diff) | |
[DWARF Import] Do not link functions without addresses to externs
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs index eda641ca..699d37a9 100644 --- a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs +++ b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs @@ -720,7 +720,9 @@ impl DebugInfoBuilder { // Link mangled names without addresses to existing symbols in the binary if func.address.is_none() && func.raw_name.is_some() { // DWARF doesn't contain GOT info, so remove any entries there...they will be wrong (relying on Binja's mechanisms for the GOT is good ) - if symbol.sym_type() != SymbolType::ImportAddress { + // Also ignore externs since we don't want to try and create functions not backed by the file + let symbol_type = symbol.sym_type(); + if symbol_type != SymbolType::ImportAddress && symbol_type != SymbolType::External { func.address = Some(symbol.address() - bv.start()); } } |
