1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
## Test llvm-nm for XCOFF object files.
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-nm %t.o | FileCheck --match-full-lines %s
--- !XCOFF
FileHeader:
MagicNumber: 0x1DF
Sections:
- Name: .text
Address: 0x0
Flags: [ STYP_TEXT ]
- Name: .data
Flags: [ STYP_DATA ]
- Name: .bss
Flags: [ STYP_BSS ]
- Name: .debug
Flags: [ STYP_DEBUG ]
- Name: .except
Flags: [ STYP_EXCEPT ]
Symbols:
- Name: .file
Section: N_DEBUG
StorageClass: C_FILE
- Name: .text
Value: 0x10
Section: .text
StorageClass: C_STAT
NumberOfAuxEntries: 1
- Name: .data
Value: 0x80
Section: .data
StorageClass: C_STAT
NumberOfAuxEntries: 1
- Name: .bss
Value: 0x310
Section: .bss
StorageClass: C_STAT
- Name: .debug
Section: .debug
StorageClass: C_STAT
- Name: ._ZL5func0v
Section: .text
StorageClass: C_EXT
Type: 0x20
AuxEntries:
- Type: AUX_CSECT
SymbolAlignmentAndType: 0x02
StorageMappingClass: XMC_PR
- Name: ._Z3fwpv
Section: .text
StorageClass: C_WEAKEXT
Type: 0x20
AuxEntries:
- Type: AUX_CSECT
SymbolAlignmentAndType: 0x02
StorageMappingClass: XMC_PR
- Name: val
Section: .data
StorageClass: C_EXT
Type: 0x20
AuxEntries:
- Type: AUX_CSECT
SymbolAlignmentAndType: 0x01
StorageMappingClass: XMC_RW
SectionOrLength: 0x4
- Name: extval
Section: N_UNDEF
StorageClass: C_EXT
Type: 0x00
AuxEntries:
- Type: AUX_CSECT
SymbolAlignmentAndType: 0x01
StorageMappingClass: XMC_UA
SectionOrLength: 0x0
- Name: comval
Section: .bss
Value: 0x13C
StorageClass: C_EXT
Type: 0x00
AuxEntries:
- Type: AUX_CSECT
SymbolAlignmentAndType: 0x03
StorageMappingClass: XMC_RW
SectionOrLength: 0x0
- Name: abs
Section: N_ABS
- Name: symIn_N_debug
Section: N_DEBUG
- Name: .except
Section: .except
## Global weak symbol.
# CHECK: 00000000 W ._Z3fwpv
## Global symbol in .text section.
# CHECK-NEXT: 00000000 T ._ZL5func0v
## Symbol in .bss section.
# CHECK-NEXT: 00000310 b .bss
## Local symbol in .data section.
# CHECK-NEXT: 00000080 d .data
## Symbol in .debug section.
# CHECK-NEXT: 00000000 N .debug
## Symbol in .except section.
# CHECK-NEXT: 00000000 ? .except
## Symbol .file.
# CHECK-NEXT: 00000000 f .file
## Local symbol in .text section.
# CHECK-NEXT: 00000010 t .text
## Absolute symbol.
# CHECK-NEXT: 00000000 a abs
## Common symbol.
# CHECK-NEXT: 0000013c C comval
## Undefined symbol.
# CHECK-NEXT: U extval
## Symbol in N_DEBUG section.
# CHECK-NEXT: 00000000 ? symIn_N_debug
## Global symbol in .data section.
# CHECK-NEXT: 00000000 D val
|