[PATCH] D75797: [llvm-objdump] --syms: print 'u' for STB_GNU_UNIQUE
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 08:34:22 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7b74b0d4e542: [llvm-objdump] --syms: print 'u' for STB_GNU_UNIQUE (authored by MaskRay).
Changed prior to commit:
https://reviews.llvm.org/D75797?vs=248895&id=250219#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75797/new/
https://reviews.llvm.org/D75797
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
@@ -1903,6 +1903,8 @@
if (auto *ELF = dyn_cast<ELFObjectFileBase>(O)) {
if (ELFSymbolRef(*I).getELFType() == ELF::STT_GNU_IFUNC)
IFunc = 'i';
+ if (ELFSymbolRef(*I).getBinding() == ELF::STB_GNU_UNIQUE)
+ GlobLoc = 'u';
}
char Debug = (Type == SymbolRef::ST_Debug || Type == SymbolRef::ST_File)
? 'd' : ' ';
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
@@ -25,7 +25,7 @@
# CHECK-NEXT:0000000000000000 *UND* 0000000000000000 reserve
# CHECK-NEXT:0000000000000000 g *ABS* 0000000000000000 abs
# CHECK-NEXT:0000000000000000 *COM* 0000000000000000 common2
-# CHECK-NEXT:0000000000000000 g O .data 0000000000000000 gnu_unique
+# CHECK-NEXT:0000000000000000 u O .data 0000000000000000 gnu_unique
# CHECK-NEXT:0000000000000000 g .data 0000000000000000 invalid_binding
# CHECK-NEXT:0000000000000000 g .data 0000000000000000 STB_HIOS
# CHECK-NEXT:0000000000000000 g .data 0000000000000000 STB_LOPROC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75797.250219.patch
Type: text/x-patch
Size: 1402 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/e0795d38/attachment.bin>
More information about the llvm-commits
mailing list