[PATCH] D54380: [llvm-objdump] Add symbol 'O' for object data
Kristina Brooks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 11 09:50:01 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346610: [llvm-objdump] Add symbol 'O' for object data (authored by kristina, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D54380?vs=173557&id=173561#toc
Repository:
rL LLVM
https://reviews.llvm.org/D54380
Files:
llvm/trunk/test/tools/llvm-objdump/WebAssembly/symbol-table.test
llvm/trunk/test/tools/llvm-objdump/X86/macho-symbol-table.test
llvm/trunk/test/tools/llvm-objdump/common-symbol-elf.test
llvm/trunk/test/tools/llvm-objdump/symbol-table-elf.test
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Index: llvm/trunk/test/tools/llvm-objdump/X86/macho-symbol-table.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/macho-symbol-table.test
+++ llvm/trunk/test/tools/llvm-objdump/X86/macho-symbol-table.test
@@ -1,8 +1,8 @@
RUN: llvm-objdump -macho -t %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s
-CHECK: SYMBOL TABLE:
-CHECK: 000000000000003b l __TEXT,__cstring L_.str
-CHECK: 0000000000000068 l __TEXT,__eh_frame EH_frame0
-CHECK: 0000000000000000 g F __TEXT,__text _main
-CHECK: 0000000000000080 g __TEXT,__eh_frame _main.eh
-CHECK: 0000000000000000 *UND* _printf
+CHECK: SYMBOL TABLE:
+CHECK-NEXT: 000000000000003b l O __TEXT,__cstring L_.str
+CHECK-NEXT: 0000000000000068 l O __TEXT,__eh_frame EH_frame0
+CHECK-NEXT: 0000000000000000 g F __TEXT,__text _main
+CHECK-NEXT: 0000000000000080 g O __TEXT,__eh_frame _main.eh
+CHECK-NEXT: 0000000000000000 *UND* _printf
Index: llvm/trunk/test/tools/llvm-objdump/WebAssembly/symbol-table.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/WebAssembly/symbol-table.test
+++ llvm/trunk/test/tools/llvm-objdump/WebAssembly/symbol-table.test
@@ -2,8 +2,8 @@
CHECK: SYMBOL TABLE:
CHECK-NEXT: 00000002 g F CODE main
-CHECK-NEXT: 00000000 l DATA .L.str
+CHECK-NEXT: 00000000 l O DATA .L.str
CHECK-NEXT: 00000000 g F *UND* puts
CHECK-NEXT: 00000003 l F CODE .LSomeOtherFunction_bitcast
CHECK-NEXT: 00000000 g F *UND* SomeOtherFunction
-CHECK-NEXT: 00000010 g DATA var
+CHECK-NEXT: 00000010 g O DATA var
Index: llvm/trunk/test/tools/llvm-objdump/common-symbol-elf.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/common-symbol-elf.test
+++ llvm/trunk/test/tools/llvm-objdump/common-symbol-elf.test
@@ -1,3 +1,3 @@
// RUN: llvm-objdump -t %p/Inputs/common-symbol-elf | FileCheck %s
-CHECK: 00000400 g *COM* 00000008 common_symbol
+CHECK: 00000400 g O *COM* 00000008 common_symbol
Index: llvm/trunk/test/tools/llvm-objdump/symbol-table-elf.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/symbol-table-elf.test
+++ llvm/trunk/test/tools/llvm-objdump/symbol-table-elf.test
@@ -5,9 +5,9 @@
# CHECK: SYMBOL TABLE:
# CHECK-NEXT: 0000000000000000 *UND* 00000000
# CHECK-NEXT: 0000000000001004 l F .text 00000000 lfoo
-# CHECK-NEXT: 0000000000001008 l .text 00000000 lbar
+# CHECK-NEXT: 0000000000001008 l O .text 00000000 lbar
# CHECK-NEXT: 0000000000001004 g F .text 00000000 foo
-# CHECK-NEXT: 0000000000001008 g .text 00000000 bar
+# CHECK-NEXT: 0000000000001008 g O .text 00000000 bar
!ELF
FileHeader:
Index: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
@@ -2014,6 +2014,8 @@
FileFunc = 'f';
else if (Type == SymbolRef::ST_Function)
FileFunc = 'F';
+ else if (Type == SymbolRef::ST_Data)
+ FileFunc = 'O';
const char *Fmt = o->getBytesInAddress() > 4 ? "%016" PRIx64 :
"%08" PRIx64;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54380.173561.patch
Type: text/x-patch
Size: 3480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181111/e64284ea/attachment.bin>
More information about the llvm-commits
mailing list