Check functions at start of code sections in detect_functions

This commit is contained in:
Luke Street 2023-08-15 22:44:48 -04:00
parent a394dfc88c
commit 908e3bb037
1 changed files with 4 additions and 0 deletions

View File

@ -88,6 +88,10 @@ impl AnalyzerState {
.insert(symbol.address as u32, (symbol.address + symbol.size) as u32);
}
}
// Also check the beginning of every code section
for section in obj.sections.iter().filter(|s| s.kind == ObjSectionKind::Code) {
self.function_entries.insert(section.address as u32);
}
// Process known functions first
let known_functions = self.function_entries.clone();