1# RUN: yaml2obj %p/Inputs/COFF/i386.yaml | llvm-objdump -t - \ 2# RUN: | FileCheck %s -check-prefix COFF-i386 3 4# COFF-i386: file format 5# COFF-i386: SYMBOL TABLE: 6# COFF-i386: [ 0](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .text 7# COFF-i386: AUX scnlen 0x24 nreloc 3 nlnno 0 checksum 0x0 assoc 1 comdat 0 8# COFF-i386: [ 2](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .data 9# COFF-i386: AUX scnlen 0xd nreloc 0 nlnno 0 checksum 0x0 assoc 2 comdat 0 10# COFF-i386: [ 4](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 0) 0x00000000 _main 11# COFF-i386: [ 5](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000 L_.str 12# COFF-i386: [ 6](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _puts 13# COFF-i386: [ 7](sec 0)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 _SomeOtherFunction 14 15# RUN: yaml2obj %s -o %t.elf-i386 16# RUN: llvm-objdump -t %t.elf-i386 | FileCheck %s --check-prefix=ELF-i386 17 18# ELF-i386: {{.*}}elf-i386: file format 19# ELF-i386: SYMBOL TABLE: 20# ELF-i386: 00000000 l df *ABS* 00000000 trivial-object-test.s 21# ELF-i386: 00000000 l d .text 00000000 .text 22# ELF-i386: 00000024 l d .rodata.str1.1 00000000 .rodata.str1.1 23# ELF-i386: 00000031 l d .note.GNU-stack 00000000 .note.GNU-stack 24# ELF-i386: 00000000 g F .text 00000024 main 25# ELF-i386: 00000000 *UND* 00000000 SomeOtherFunction 26# ELF-i386: 00000000 *UND* 00000000 puts 27 28--- !ELF 29FileHeader: 30 Class: ELFCLASS32 31 Data: ELFDATA2LSB 32 Type: ET_REL 33 Machine: EM_386 34Sections: 35 - Name: .text 36 Type: SHT_PROGBITS 37 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 38 - Name: .rodata.str1.1 39 Type: SHT_PROGBITS 40 Flags: [ SHF_ALLOC, SHF_MERGE, SHF_STRINGS ] 41 Address: 0x0000000000000024 42 - Name: .note.GNU-stack 43 Type: SHT_PROGBITS 44 Address: 0x0000000000000031 45Symbols: 46 - Name: trivial-object-test.s 47 Type: STT_FILE 48 Index: SHN_ABS 49 - Name: .text 50 Type: STT_SECTION 51 Section: .text 52 - Name: .rodata.str1.1 53 Type: STT_SECTION 54 Section: .rodata.str1.1 55 - Name: .note.GNU-stack 56 Type: STT_SECTION 57 Section: .note.GNU-stack 58 - Name: main 59 Type: STT_FUNC 60 Section: .text 61 Binding: STB_GLOBAL 62 Size: 0x0000000000000024 63 - Name: SomeOtherFunction 64 Binding: STB_GLOBAL 65 - Name: puts 66 Binding: STB_GLOBAL 67 68# RUN: llvm-objdump -t %p/Inputs/trivial-object-test.macho-i386 \ 69# RUN: | FileCheck %s -check-prefix macho-i386 70 71# macho-i386: trivial-object-test.macho-i386: file format mach-o 32-bit i386 72# macho-i386: SYMBOL TABLE: 73# macho-i386: 00000000 g F __TEXT,__text _main 74# macho-i386: 00000000 *UND* _SomeOtherFunction 75# macho-i386: 00000000 *UND* _puts 76 77# RUN: llvm-objdump -t %p/Inputs/shared-object-test.elf-i386 \ 78# RUN: | FileCheck %s -check-prefix ELF-shared 79 80# ELF-shared: shared-object-test.elf-i386: file format 81# ELF-shared: SYMBOL TABLE: 82# ELF-shared: 00000200 l F .text 00000003 local_func 83# ELF-shared: 000012b8 l O *ABS* 00000000 .hidden _GLOBAL_OFFSET_TABLE_ 84# ELF-shared: 00001248 l O *ABS* 00000000 .hidden _DYNAMIC 85# ELF-shared: 000012c4 g O .data 00000004 defined_sym 86# ELF-shared: 000001f0 g F .text 00000003 global_func 87