mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-27 05:32:22 +00:00
ELFDumper: Unversioned symbols must not have trailing @
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a55b262ca2
commit
b16d4d3441
@ -14,15 +14,15 @@ CHECK-NEXT: Link: 1
|
||||
CHECK-NEXT: Symbols [
|
||||
CHECK-NEXT: Symbol {
|
||||
CHECK-NEXT: Version: 0
|
||||
CHECK-NEXT: Name: @
|
||||
CHECK-NEXT: Name:
|
||||
CHECK-NEXT: }
|
||||
CHECK-NEXT: Symbol {
|
||||
CHECK-NEXT: Version: 1
|
||||
CHECK-NEXT: Name: _end@
|
||||
CHECK-NEXT: Name: _end
|
||||
CHECK-NEXT: }
|
||||
CHECK-NEXT: Symbol {
|
||||
CHECK-NEXT: Version: 1
|
||||
CHECK-NEXT: Name: _edata@
|
||||
CHECK-NEXT: Name: _edata
|
||||
CHECK-NEXT: }
|
||||
CHECK-NEXT: Symbol {
|
||||
CHECK-NEXT: Version: 3
|
||||
@ -30,7 +30,7 @@ CHECK-NEXT: Name: goo@@VERSION2
|
||||
CHECK-NEXT: }
|
||||
CHECK-NEXT: Symbol {
|
||||
CHECK-NEXT: Version: 1
|
||||
CHECK-NEXT: Name: __bss_start@
|
||||
CHECK-NEXT: Name: __bss_start
|
||||
CHECK-NEXT: }
|
||||
CHECK-NEXT: Symbol {
|
||||
CHECK-NEXT: Version: 2
|
||||
|
@ -52,7 +52,7 @@ GOT-EXE-NEXT: Initial: 0x0
|
||||
GOT-EXE-NEXT: Value: 0x0
|
||||
GOT-EXE-NEXT: Type: Function (0x2)
|
||||
GOT-EXE-NEXT: Section: Undefined (0x0)
|
||||
GOT-EXE-NEXT: Name: __gmon_start__@ (1)
|
||||
GOT-EXE-NEXT: Name: __gmon_start__ (1)
|
||||
GOT-EXE-NEXT: }
|
||||
GOT-EXE-NEXT: ]
|
||||
GOT-EXE-NEXT: Number of TLS and multi-GOT entries: 0
|
||||
@ -124,7 +124,7 @@ GOT-SO-NEXT: Initial: 0x0
|
||||
GOT-SO-NEXT: Value: 0x0
|
||||
GOT-SO-NEXT: Type: None (0x0)
|
||||
GOT-SO-NEXT: Section: Undefined (0x0)
|
||||
GOT-SO-NEXT: Name: _ITM_registerTMCloneTable@ (87)
|
||||
GOT-SO-NEXT: Name: _ITM_registerTMCloneTable (87)
|
||||
GOT-SO-NEXT: }
|
||||
GOT-SO-NEXT: Entry {
|
||||
GOT-SO-NEXT: Address: 0x1090C
|
||||
@ -133,7 +133,7 @@ GOT-SO-NEXT: Initial: 0x0
|
||||
GOT-SO-NEXT: Value: 0x0
|
||||
GOT-SO-NEXT: Type: None (0x0)
|
||||
GOT-SO-NEXT: Section: Undefined (0x0)
|
||||
GOT-SO-NEXT: Name: _Jv_RegisterClasses@ (128)
|
||||
GOT-SO-NEXT: Name: _Jv_RegisterClasses (128)
|
||||
GOT-SO-NEXT: }
|
||||
GOT-SO-NEXT: Entry {
|
||||
GOT-SO-NEXT: Address: 0x10910
|
||||
@ -142,7 +142,7 @@ GOT-SO-NEXT: Initial: 0x0
|
||||
GOT-SO-NEXT: Value: 0x0
|
||||
GOT-SO-NEXT: Type: Function (0x2)
|
||||
GOT-SO-NEXT: Section: Undefined (0x0)
|
||||
GOT-SO-NEXT: Name: __gmon_start__@ (23)
|
||||
GOT-SO-NEXT: Name: __gmon_start__ (23)
|
||||
GOT-SO-NEXT: }
|
||||
GOT-SO-NEXT: Entry {
|
||||
GOT-SO-NEXT: Address: 0x10914
|
||||
@ -160,7 +160,7 @@ GOT-SO-NEXT: Initial: 0x0
|
||||
GOT-SO-NEXT: Value: 0x0
|
||||
GOT-SO-NEXT: Type: None (0x0)
|
||||
GOT-SO-NEXT: Section: Undefined (0x0)
|
||||
GOT-SO-NEXT: Name: _ITM_deregisterTMCloneTable@ (59)
|
||||
GOT-SO-NEXT: Name: _ITM_deregisterTMCloneTable (59)
|
||||
GOT-SO-NEXT: }
|
||||
GOT-SO-NEXT: Entry {
|
||||
GOT-SO-NEXT: Address: 0x1091C
|
||||
@ -256,7 +256,7 @@ GOT-TLS-NEXT: Initial: 0x0
|
||||
GOT-TLS-NEXT: Value: 0x0
|
||||
GOT-TLS-NEXT: Type: None (0x0)
|
||||
GOT-TLS-NEXT: Section: Undefined (0x0)
|
||||
GOT-TLS-NEXT: Name: _ITM_registerTMCloneTable@ (78)
|
||||
GOT-TLS-NEXT: Name: _ITM_registerTMCloneTable (78)
|
||||
GOT-TLS-NEXT: }
|
||||
GOT-TLS-NEXT: Entry {
|
||||
GOT-TLS-NEXT: Address: 0x10C70
|
||||
@ -265,7 +265,7 @@ GOT-TLS-NEXT: Initial: 0x0
|
||||
GOT-TLS-NEXT: Value: 0x0
|
||||
GOT-TLS-NEXT: Type: None (0x0)
|
||||
GOT-TLS-NEXT: Section: Undefined (0x0)
|
||||
GOT-TLS-NEXT: Name: _Jv_RegisterClasses@ (119)
|
||||
GOT-TLS-NEXT: Name: _Jv_RegisterClasses (119)
|
||||
GOT-TLS-NEXT: }
|
||||
GOT-TLS-NEXT: Entry {
|
||||
GOT-TLS-NEXT: Address: 0x10C78
|
||||
@ -274,7 +274,7 @@ GOT-TLS-NEXT: Initial: 0x0
|
||||
GOT-TLS-NEXT: Value: 0x0
|
||||
GOT-TLS-NEXT: Type: Function (0x2)
|
||||
GOT-TLS-NEXT: Section: Undefined (0x0)
|
||||
GOT-TLS-NEXT: Name: __gmon_start__@ (23)
|
||||
GOT-TLS-NEXT: Name: __gmon_start__ (23)
|
||||
GOT-TLS-NEXT: }
|
||||
GOT-TLS-NEXT: Entry {
|
||||
GOT-TLS-NEXT: Address: 0x10C80
|
||||
@ -292,7 +292,7 @@ GOT-TLS-NEXT: Initial: 0x0
|
||||
GOT-TLS-NEXT: Value: 0x0
|
||||
GOT-TLS-NEXT: Type: None (0x0)
|
||||
GOT-TLS-NEXT: Section: Undefined (0x0)
|
||||
GOT-TLS-NEXT: Name: _ITM_deregisterTMCloneTable@ (50)
|
||||
GOT-TLS-NEXT: Name: _ITM_deregisterTMCloneTable (50)
|
||||
GOT-TLS-NEXT: }
|
||||
GOT-TLS-NEXT: Entry {
|
||||
GOT-TLS-NEXT: Address: 0x10C90
|
||||
|
@ -705,6 +705,9 @@ std::string ELFDumper<ELFT>::getFullSymbolName(const Elf_Sym *Symbol,
|
||||
|
||||
bool IsDefault;
|
||||
StringRef Version = getSymbolVersion(StrTable, &*Symbol, IsDefault);
|
||||
// Unversioned symbol must not have any suffix @
|
||||
if (!IsDefault && Version == "")
|
||||
return FullSymbolName;
|
||||
FullSymbolName += (IsDefault ? "@@" : "@");
|
||||
FullSymbolName += Version;
|
||||
return FullSymbolName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user