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/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/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;