Compiler projects using llvm
## 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