llvm/test/tools/llvm-objdump/X86/macho-symbol-table.test
Kuba Brecka 4e0567ae26 [Object, MachO] Mark symbols from DATA and BSS sections as ST_Data
In `MachOObjectFile::getSymbolType` we currently always return `SymbolRef::ST_Function` for symbols from any section. In order for llvm-symbolizer to correctly symbolize Mach-O globals, symbols from data and BSS sections should return `SymbolRef::ST_Data`.

Differential Revision: http://reviews.llvm.org/D14576



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252867 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-12 09:40:29 +00:00

9 lines
395 B
Plaintext

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