| 12
 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
 
 | ## Test global symbal table of big archive.
# RUN: rm -rf %t && mkdir %t && cd %t
# RUN: yaml2obj --docnum=1 -DFLAG=0x1DF %s -o t32_1.o
# RUN: yaml2obj --docnum=1 -DFLAG=0x1F7 %s -o t64_1.o
# RUN: yaml2obj --docnum=2 -DFLAG=0x1DF %s -o t32_2.o
# RUN: yaml2obj --docnum=2 -DFLAG=0x1F7 %s -o t64_2.o
# RUN: llvm-as -o 32.bc %p/Inputs/bitcode-sym32.ll
# RUN: llvm-as -o 64.bc %p/Inputs/bitcode-sym64.ll
## Test printing a big archive which only has 32-bits symbol names
# RUN: llvm-ar q t32.a t32_1.o t32_2.o 32.bc
# RUN: llvm-nm --print-armap t32.a 2>&1 | FileCheck --check-prefixes=GLOB32,NOGL64 %s
## Test printing a big archive which only has 64-bits symbol names
# RUN: llvm-ar q t64.a t64_1.o t64_2.o 64.bc
# RUN: llvm-nm --print-armap t64.a 2>&1 | FileCheck --check-prefixes=GLOB64,NOGL32 %s
## Test printing all 32-bits symbol names first and then 64-bits
# RUN: llvm-ar q t32_64_all.a t32_1.o t64_1.o t32_2.o t64_2.o 32.bc 64.bc
# RUN: llvm-nm --print-armap t32_64_all.a 2>&1 | FileCheck --check-prefixes=GLOB32,GLOB64 %s
#GLOB32:      var_0x1DF in t32_1.o
#GLOB32-NEXT: array_0x1DF in t32_1.o
#GLOB32-NEXT: func_0x1DF in t32_2.o
#GLOB32-NEXT: bar_0x1DF in t32_2.o
#GLOB32-NEXT: foo32 in 32.bc
#GLOB32-NEXT: C32 in 32.bc 
#NOGL32-NOT: var_0x1DF in t32_1.o
#NOGL32-NOT:  array_0x1DF in t32_1.o
#NOGL32-NOT:  func_0x1DF in t32_2.o
#NOGL32-NOT:  bar_0x1DF in t32_2.o
#NOGL32-NOT:  foo32 in 32.bc
#NOGL32-NOT:  C32 in 32.bc
#GLOB64:      var_0x1F7 in t64_1.o
#GLOB64-NEXT: array_0x1F7 in t64_1.o
#GLOB64-NEXT: func_0x1F7 in t64_2.o
#GLOB64-NEXT: bar_0x1F7 in t64_2.o
#GLOB64-NEXT: bar64 in 64.bc
#GLOB64-NEXT: C64 in 64.bc
#NOGL64-NOT: var_0x1F7 in t64_1.o
#NOGL64-NOT: array_0x1F7 in t64_1.o
#NOGL64-NOT: func_0x1F7 in t64_2.o
#NOGL64-NOT: bar_0x1F7 in t64_2.o
#NOGL64-NOT: bar64 in 64.bc
#NOGL64-NOT: C64 in 64.bc
--- !XCOFF
FileHeader:
  MagicNumber:       [[FLAG]]
Sections:
  - Name:            .data
    Flags:           [ STYP_DATA ]
Symbols:
  - Name:            var_[[FLAG]]
    Section:         .data
    Type:            0x4000
    StorageClass:    C_EXT
    AuxEntries:
     - Type:                   AUX_CSECT
       SymbolAlignmentAndType: 0x09
       StorageMappingClass:    XMC_RW
  - Name:            array_[[FLAG]]
    Section:         .data
    Type:            0x4000
    StorageClass:    C_EXT
    AuxEntries:
     - Type:                   AUX_CSECT
       SymbolAlignmentAndType: 0x09
       StorageMappingClass:    XMC_RW
--- !XCOFF
FileHeader:
  MagicNumber:       [[FLAG]]
Sections:
  - Name:            .text
    Flags:           [ STYP_DATA ]
Symbols:
  - Name:            func_[[FLAG]]
    Section:         .text
    Type:            0x4000
    StorageClass:    C_EXT
    AuxEntries:
     - Type:                   AUX_CSECT
       SymbolAlignmentAndType: 0x09
       StorageMappingClass:    XMC_PR
  - Name:            bar_[[FLAG]]
    Section:         .text
    Type:            0x4000
    StorageClass:    C_EXT
    AuxEntries:
     - Type:                   AUX_CSECT
       SymbolAlignmentAndType: 0x09
       StorageMappingClass:    XMC_PR
 |