1## Show that llvm-nm prints the symbols of all ELF members of an archive. 2 3# RUN: yaml2obj %s --docnum=1 -o %t1.o 4# RUN: yaml2obj %s --docnum=2 -o %t2.o 5 6# RUN: rm -f %t.symtab 7# RUN: llvm-ar rc %t.symtab %t1.o %t2.o 8# RUN: llvm-nm %t.symtab | FileCheck %s --match-full-lines 9 10# RUN: rm -f %t.nosymtab 11# RUN: llvm-ar rcS %t.nosymtab %t1.o %t2.o 12# RUN: llvm-nm %t.nosymtab | FileCheck %s --match-full-lines 13 14# CHECK: {{.*}}1.o: 15# CHECK-NEXT: 00000002 D global_data_symbol 16# CHECK-NEXT: 00000000 T global_function_symbol 17# CHECK-EMPTY: 18# CHECK-NEXT: {{.*}}2.o: 19# CHECK-NEXT: 00000001 D another_data_symbol 20 21--- !ELF 22FileHeader: 23 Class: ELFCLASS32 24 Data: ELFDATA2LSB 25 Type: ET_REL 26 Machine: EM_386 27Sections: 28 - Name: .text 29 Type: SHT_PROGBITS 30 Flags: [SHF_ALLOC, SHF_EXECINSTR] 31 - Name: .data 32 Type: SHT_PROGBITS 33 Flags: [SHF_ALLOC, SHF_WRITE] 34Symbols: 35 - Name: global_function_symbol 36 Value: 0x0 37 Binding: STB_GLOBAL 38 Section: .text 39 - Name: global_data_symbol 40 Binding: STB_GLOBAL 41 Section: .data 42 Value: 0x2 43 44--- !ELF 45FileHeader: 46 Class: ELFCLASS32 47 Data: ELFDATA2LSB 48 Type: ET_REL 49 Machine: EM_386 50Sections: 51 - Name: .data 52 Type: SHT_PROGBITS 53 Flags: [SHF_ALLOC, SHF_WRITE] 54Symbols: 55 - Name: another_data_symbol 56 Binding: STB_GLOBAL 57 Section: .data 58 Value: 0x1 59