From 0493db09dee436a9ecb9009ae7222dccefd3d5e3 Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Fri, 18 Apr 2025 15:46:27 -0400 Subject: Various DWARF fixes - Do not add binary base to function address twice when a symbol with that function's raw name already exists - Load eh_frame/debug_frame from base bv instead of debug bv and make calculated cie offset ranges relative to bv start - Fix dwarf raw name resolution not resolving specification - Try to load eh_frame/debug_frame from both raw and normal views in dwarf import --- plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs') diff --git a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs index 604867f5..136a7a8b 100644 --- a/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs +++ b/plugins/dwarf/dwarf_import/src/dwarfdebuginfo.rs @@ -608,7 +608,7 @@ impl DebugInfoBuilder { 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 { - func.address = Some(symbol.address()); + func.address = Some(symbol.address() - bv.start()); } } -- cgit v1.3.1