Skip to content

Commit

Permalink
Include common symbols in ObjSymbols::for_range
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Aug 8, 2023
1 parent e215b6d commit 9684701
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/obj/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<R>(
Expand All @@ -382,7 +382,6 @@ impl ObjSymbols {
) -> impl DoubleEndedIterator<Item = (SymbolIndex, &ObjSymbol)> {
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))
}

Expand Down

0 comments on commit 9684701

Please sign in to comment.