Skip to content

Commit 94c7761

Browse files
authored
Fix name normalization failing for GCC symbols with multiple periods (#420)
* Fix name normalization failing for GCC symbols with multiple periods * Update test snapshot * Don't treat symbols starting with a period as GCC unique IDs
1 parent cdd013f commit 94c7761

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎objdiff-core/src/obj/read.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ fn get_normalized_symbol_name(name: &str) -> Option<String> {
5959
{
6060
// Match Metrowerks symbol$1234 against symbol$2345
6161
Some(format!("{prefix}${DUMMY_UNIQUE_ID}"))
62-
} else if let Some((prefix, suffix)) = name.split_once('.')
62+
} else if !name.starts_with('.')
63+
&& let Some((prefix, suffix)) = name.rsplit_once('.')
6364
&& suffix.chars().all(char::is_numeric)
6465
{
6566
// Match GCC symbol.1234 against symbol.2345

0 commit comments

Comments
 (0)