From 9684701d5b562d4d0ae1572a29521eb36a7e286f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 7 Aug 2023 20:05:00 -0400 Subject: [PATCH] Include common symbols in ObjSymbols::for_range --- src/obj/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/obj/mod.rs b/src/obj/mod.rs index 9e834ca..8adb08b 100644 --- a/src/obj/mod.rs +++ b/src/obj/mod.rs @@ -363,7 +363,7 @@ impl ObjSymbols { .range(range) .flat_map(move |(_, v)| v.iter().map(move |u| (*u, &self.symbols[*u]))) // Ignore ABS symbols - .filter(move |(_, sym)| sym.section.is_some()) + .filter(move |(_, sym)| sym.section.is_some() || sym.flags.is_common()) } pub fn indexes_for_range( @@ -382,7 +382,6 @@ impl ObjSymbols { ) -> impl DoubleEndedIterator { let section_index = section.index; self.for_range(section.address as u32..(section.address + section.size) as u32) - // TODO required? .filter(move |(_, symbol)| symbol.section == Some(section_index)) }