forked from OSchip/llvm-project
[llvm-objdump] --syms: print 'i' for STT_GNU_IFUNC
Reviewed By: grimar, Higuoxing, jhenderson Differential Revision: https://reviews.llvm.org/D75793
This commit is contained in:
parent
0bd3da5bfa
commit
e799405e53
|
@ -15,7 +15,7 @@
|
||||||
# CHECK-NEXT:0000000000000000 g F .text 000000000000000f func
|
# CHECK-NEXT:0000000000000000 g F .text 000000000000000f func
|
||||||
# CHECK-NEXT:0000000000000000 g O *COM* 0000000000000000 common
|
# CHECK-NEXT:0000000000000000 g O *COM* 0000000000000000 common
|
||||||
# CHECK-NEXT:0000000000000000 g O .data 0000000000000000 tls
|
# CHECK-NEXT:0000000000000000 g O .data 0000000000000000 tls
|
||||||
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 ifunc
|
# CHECK-NEXT:0000000000000000 g i .text 0000000000000000 ifunc
|
||||||
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 invalid_type
|
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 invalid_type
|
||||||
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_HIOS
|
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_HIOS
|
||||||
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_LOPROC
|
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_LOPROC
|
||||||
|
|
|
@ -1899,6 +1899,11 @@ void printSymbolTable(const ObjectFile *O, StringRef ArchiveName,
|
||||||
char GlobLoc = ' ';
|
char GlobLoc = ' ';
|
||||||
if ((Section != O->section_end() || Absolute) && !Weak)
|
if ((Section != O->section_end() || Absolute) && !Weak)
|
||||||
GlobLoc = Global ? 'g' : 'l';
|
GlobLoc = Global ? 'g' : 'l';
|
||||||
|
char IFunc = ' ';
|
||||||
|
if (auto *ELF = dyn_cast<ELFObjectFileBase>(O)) {
|
||||||
|
if (ELFSymbolRef(*I).getELFType() == ELF::STT_GNU_IFUNC)
|
||||||
|
IFunc = 'i';
|
||||||
|
}
|
||||||
char Debug = (Type == SymbolRef::ST_Debug || Type == SymbolRef::ST_File)
|
char Debug = (Type == SymbolRef::ST_Debug || Type == SymbolRef::ST_File)
|
||||||
? 'd' : ' ';
|
? 'd' : ' ';
|
||||||
char FileFunc = ' ';
|
char FileFunc = ' ';
|
||||||
|
@ -1917,7 +1922,7 @@ void printSymbolTable(const ObjectFile *O, StringRef ArchiveName,
|
||||||
<< (Weak ? 'w' : ' ') // Weak?
|
<< (Weak ? 'w' : ' ') // Weak?
|
||||||
<< ' ' // Constructor. Not supported yet.
|
<< ' ' // Constructor. Not supported yet.
|
||||||
<< ' ' // Warning. Not supported yet.
|
<< ' ' // Warning. Not supported yet.
|
||||||
<< ' ' // Indirect reference to another symbol.
|
<< IFunc
|
||||||
<< Debug // Debugging (d) or dynamic (D) symbol.
|
<< Debug // Debugging (d) or dynamic (D) symbol.
|
||||||
<< FileFunc // Name of function (F), file (f) or object (O).
|
<< FileFunc // Name of function (F), file (f) or object (O).
|
||||||
<< ' ';
|
<< ' ';
|
||||||
|
|
Loading…
Reference in New Issue