Skip to content

Commit 328995d

Browse files
committed
[TMS320C6x] Prevent functions at $C$ labels
TMS320C6x ELFs contain function symbols for code labels that are not the starts of functions
1 parent 24eabc0 commit 328995d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

view/elf/elfview.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,10 @@ bool ElfView::Init()
13381338
DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding);
13391339
break;
13401340
case ELF_STT_FUNC:
1341-
DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding);
1341+
if (!m_plat || m_plat->GetName() != "tms320c6x" || !entry->name.starts_with("$C$")) {
1342+
// TMS320C6x ELFs contain function symbols for labeling blocks that aren't actually functions
1343+
DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding);
1344+
}
13421345
break;
13431346
case ELF_STT_TLS:
13441347
/* - only create Binja symbols for .symtab (not .dynsym) symbols

0 commit comments

Comments
 (0)