99 lines · plain
1## Test global symbal table of big archive.2 3# RUN: rm -rf %t && mkdir %t && cd %t4# RUN: yaml2obj --docnum=1 -DFLAG=0x1DF %s -o t32_1.o5# RUN: yaml2obj --docnum=1 -DFLAG=0x1F7 %s -o t64_1.o6# RUN: yaml2obj --docnum=2 -DFLAG=0x1DF %s -o t32_2.o7# RUN: yaml2obj --docnum=2 -DFLAG=0x1F7 %s -o t64_2.o8# RUN: llvm-as -o 32.bc %p/Inputs/bitcode-sym32.ll9# RUN: llvm-as -o 64.bc %p/Inputs/bitcode-sym64.ll10 11## Test printing a big archive which only has 32-bits symbol names12# RUN: llvm-ar q t32.a t32_1.o t32_2.o 32.bc13# RUN: llvm-nm --print-armap t32.a 2>&1 | FileCheck --check-prefixes=GLOB32,NOGL64 %s14 15## Test printing a big archive which only has 64-bits symbol names16# RUN: llvm-ar q t64.a t64_1.o t64_2.o 64.bc17# RUN: llvm-nm --print-armap t64.a 2>&1 | FileCheck --check-prefixes=GLOB64,NOGL32 %s18 19## Test printing all 32-bits symbol names first and then 64-bits20# RUN: llvm-ar q t32_64_all.a t32_1.o t64_1.o t32_2.o t64_2.o 32.bc 64.bc21 22# RUN: llvm-nm --print-armap t32_64_all.a 2>&1 | FileCheck --check-prefixes=GLOB32,GLOB64 %s23 24#GLOB32: var_0x1DF in t32_1.o25#GLOB32-NEXT: array_0x1DF in t32_1.o26#GLOB32-NEXT: func_0x1DF in t32_2.o27#GLOB32-NEXT: bar_0x1DF in t32_2.o28#GLOB32-NEXT: foo32 in 32.bc29#GLOB32-NEXT: C32 in 32.bc 30 31#NOGL32-NOT: var_0x1DF in t32_1.o32#NOGL32-NOT: array_0x1DF in t32_1.o33#NOGL32-NOT: func_0x1DF in t32_2.o34#NOGL32-NOT: bar_0x1DF in t32_2.o35#NOGL32-NOT: foo32 in 32.bc36#NOGL32-NOT: C32 in 32.bc37 38#GLOB64: var_0x1F7 in t64_1.o39#GLOB64-NEXT: array_0x1F7 in t64_1.o40#GLOB64-NEXT: func_0x1F7 in t64_2.o41#GLOB64-NEXT: bar_0x1F7 in t64_2.o42#GLOB64-NEXT: bar64 in 64.bc43#GLOB64-NEXT: C64 in 64.bc44 45#NOGL64-NOT: var_0x1F7 in t64_1.o46#NOGL64-NOT: array_0x1F7 in t64_1.o47#NOGL64-NOT: func_0x1F7 in t64_2.o48#NOGL64-NOT: bar_0x1F7 in t64_2.o49#NOGL64-NOT: bar64 in 64.bc50#NOGL64-NOT: C64 in 64.bc51 52--- !XCOFF53FileHeader:54 MagicNumber: [[FLAG]]55Sections:56 - Name: .data57 Flags: [ STYP_DATA ]58Symbols:59 - Name: var_[[FLAG]]60 Section: .data61 Type: 0x400062 StorageClass: C_EXT63 AuxEntries:64 - Type: AUX_CSECT65 SymbolAlignmentAndType: 0x0966 StorageMappingClass: XMC_RW67 - Name: array_[[FLAG]]68 Section: .data69 Type: 0x400070 StorageClass: C_EXT71 AuxEntries:72 - Type: AUX_CSECT73 SymbolAlignmentAndType: 0x0974 StorageMappingClass: XMC_RW75 76--- !XCOFF77FileHeader:78 MagicNumber: [[FLAG]]79Sections:80 - Name: .text81 Flags: [ STYP_DATA ]82Symbols:83 - Name: func_[[FLAG]]84 Section: .text85 Type: 0x400086 StorageClass: C_EXT87 AuxEntries:88 - Type: AUX_CSECT89 SymbolAlignmentAndType: 0x0990 StorageMappingClass: XMC_PR91 - Name: bar_[[FLAG]]92 Section: .text93 Type: 0x400094 StorageClass: C_EXT95 AuxEntries:96 - Type: AUX_CSECT97 SymbolAlignmentAndType: 0x0998 StorageMappingClass: XMC_PR99