Skip to content

Commit eddece4

Browse files
committed
Thought that section was the section address not the section number.
1 parent 391cb19 commit eddece4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

objdiff-core/src/obj/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ pub struct Object {
273273
pub path: Option<std::path::PathBuf>,
274274
#[cfg(feature = "std")]
275275
pub timestamp: Option<filetime::FileTime>,
276-
flow_analysis_results: BTreeMap<u64, Box<dyn FlowAnalysisResult>>,
276+
pub flow_analysis_results: BTreeMap<u64, Box<dyn FlowAnalysisResult>>,
277277
}
278278

279279
impl Default for Object {
@@ -329,7 +329,7 @@ impl Object {
329329
}
330330

331331
pub fn get_flow_analysis_result(&self, symbol: &Symbol) -> Option<&dyn FlowAnalysisResult> {
332-
let key = symbol.section.unwrap_or_default() as u64 + symbol.address;
332+
let key = symbol.section.unwrap_or_default() as u64 * 1024 * 1024 * 1024 + symbol.address;
333333
self.flow_analysis_results.get(&key).map(|result| result.as_ref())
334334
}
335335

@@ -338,7 +338,7 @@ impl Object {
338338
symbol: &Symbol,
339339
result: Box<dyn FlowAnalysisResult>,
340340
) {
341-
let key = symbol.section.unwrap_or_default() as u64 + symbol.address;
341+
let key = symbol.section.unwrap_or_default() as u64 * 1024 * 1024 * 1024 + symbol.address;
342342
self.flow_analysis_results.insert(key, result);
343343
}
344344

0 commit comments

Comments
 (0)