1 ## Test global symbal table of big archive.
3 # RUN: rm -rf %t && mkdir %t && cd %t
4 # RUN: yaml2obj --docnum=1 -DFLAG=0x1DF %s -o t32_1.o
5 # RUN: yaml2obj --docnum=1 -DFLAG=0x1F7 %s -o t64_1.o
6 # RUN: yaml2obj --docnum=2 -DFLAG=0x1DF %s -o t32_2.o
7 # RUN: yaml2obj --docnum=2 -DFLAG=0x1F7 %s -o t64_2.o
8 # RUN: llvm-as -o 32.bc %p/Inputs/bitcode-sym32.ll
9 # RUN: llvm-as -o 64.bc %p/Inputs/bitcode-sym64.ll
11 ## Test printing a big archive which only has 32-bits symbol names
12 # RUN: llvm-ar q t32.a t32_1.o t32_2.o 32.bc
13 # RUN: llvm-nm --print-armap t32.a 2>&1 | FileCheck --check-prefixes=GLOB32,NOGL64 %s
15 ## Test printing a big archive which only has 64-bits symbol names
16 # RUN: llvm-ar q t64.a t64_1.o t64_2.o 64.bc
17 # RUN: llvm-nm --print-armap t64.a 2>&1 | FileCheck --check-prefixes=GLOB64,NOGL32 %s
19 ## Test printing all 32-bits symbol names first and then 64-bits
20 # RUN: llvm-ar q t32_64_all.a t32_1.o t64_1.o t32_2.o t64_2.o 32.bc 64.bc
22 # RUN: llvm-nm --print-armap t32_64_all.a 2>&1 | FileCheck --check-prefixes=GLOB32,GLOB64 %s
24 #GLOB32: var_0x1DF in t32_1.o
25 #GLOB32-NEXT: array_0x1DF in t32_1.o
26 #GLOB32-NEXT: func_0x1DF in t32_2.o
27 #GLOB32-NEXT: bar_0x1DF in t32_2.o
28 #GLOB32-NEXT: foo32 in 32.bc
29 #GLOB32-NEXT: C32 in 32.bc
31 #NOGL32-NOT: var_0x1DF in t32_1.o
32 #NOGL32-NOT: array_0x1DF in t32_1.o
33 #NOGL32-NOT: func_0x1DF in t32_2.o
34 #NOGL32-NOT: bar_0x1DF in t32_2.o
35 #NOGL32-NOT: foo32 in 32.bc
36 #NOGL32-NOT: C32 in 32.bc
38 #GLOB64: var_0x1F7 in t64_1.o
39 #GLOB64-NEXT: array_0x1F7 in t64_1.o
40 #GLOB64-NEXT: func_0x1F7 in t64_2.o
41 #GLOB64-NEXT: bar_0x1F7 in t64_2.o
42 #GLOB64-NEXT: bar64 in 64.bc
43 #GLOB64-NEXT: C64 in 64.bc
45 #NOGL64-NOT: var_0x1F7 in t64_1.o
46 #NOGL64-NOT: array_0x1F7 in t64_1.o
47 #NOGL64-NOT: func_0x1F7 in t64_2.o
48 #NOGL64-NOT: bar_0x1F7 in t64_2.o
49 #NOGL64-NOT: bar64 in 64.bc
50 #NOGL64-NOT: C64 in 64.bc
65 SymbolAlignmentAndType: 0x09
66 StorageMappingClass: XMC_RW
67 - Name: array_[[FLAG]]
73 SymbolAlignmentAndType: 0x09
74 StorageMappingClass: XMC_RW
89 SymbolAlignmentAndType: 0x09
90 StorageMappingClass: XMC_PR
97 SymbolAlignmentAndType: 0x09
98 StorageMappingClass: XMC_PR