[PATCH] D75793: [llvm-objdump] --syms: print 'i' for STT_GNU_IFUNC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 08:34:21 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe799405e5368: [llvm-objdump] --syms: print 'i' for STT_GNU_IFUNC (authored by MaskRay).
Changed prior to commit:
https://reviews.llvm.org/D75793?vs=249422&id=250218#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75793/new/
https://reviews.llvm.org/D75793
Files:
llvm/test/tools/llvm-objdump/ELF/symbol-table.test
llvm/tools/llvm-objdump/llvm-objdump.cpp
Index: llvm/tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -1899,6 +1899,11 @@
char GlobLoc = ' ';
if ((Section != O->section_end() || Absolute) && !Weak)
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)
? 'd' : ' ';
char FileFunc = ' ';
@@ -1917,7 +1922,7 @@
<< (Weak ? 'w' : ' ') // Weak?
<< ' ' // Constructor. Not supported yet.
<< ' ' // Warning. Not supported yet.
- << ' ' // Indirect reference to another symbol.
+ << IFunc
<< Debug // Debugging (d) or dynamic (D) symbol.
<< FileFunc // Name of function (F), file (f) or object (O).
<< ' ';
Index: llvm/test/tools/llvm-objdump/ELF/symbol-table.test
===================================================================
--- llvm/test/tools/llvm-objdump/ELF/symbol-table.test
+++ llvm/test/tools/llvm-objdump/ELF/symbol-table.test
@@ -15,7 +15,7 @@
# CHECK-NEXT:0000000000000000 g F .text 000000000000000f func
# CHECK-NEXT:0000000000000000 g O *COM* 0000000000000000 common
# 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 STT_HIOS
# CHECK-NEXT:0000000000000000 g .text 0000000000000000 STT_LOPROC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75793.250218.patch
Type: text/x-patch
Size: 1873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/b4553f2b/attachment.bin>
More information about the llvm-commits
mailing list