Compare commits

...

1 Commits
v3.0.0 ... main

Author SHA1 Message Date
iFarbod
7c424a7966
Ignore switchD_ labels generated by Ghidra (#241)
Seeing how commonly used boricj's delinker extension is, it makes sense for this one to be included by default, before #238 is considered and worked on.
2025-08-19 10:23:07 -06:00

View File

@ -130,7 +130,7 @@ fn map_symbols(
/// When inferring a symbol's size, we ignore symbols that start with specific prefixes. They are /// When inferring a symbol's size, we ignore symbols that start with specific prefixes. They are
/// usually emitted as branch targets and do not represent the start of a function or object. /// usually emitted as branch targets and do not represent the start of a function or object.
fn is_local_label(symbol: &Symbol) -> bool { fn is_local_label(symbol: &Symbol) -> bool {
const LABEL_PREFIXES: &[&str] = &[".L", "LAB_"]; const LABEL_PREFIXES: &[&str] = &[".L", "LAB_", "switchD_"];
symbol.size == 0 symbol.size == 0
&& symbol.flags.contains(SymbolFlag::Local) && symbol.flags.contains(SymbolFlag::Local)
&& LABEL_PREFIXES.iter().any(|p| symbol.name.starts_with(p)) && LABEL_PREFIXES.iter().any(|p| symbol.name.starts_with(p))