Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 1 | # RUN: yaml2obj %s > %t |
| 2 | # RUN: llvm-objcopy --strip-all %t %t2 |
| 3 | # RUN: llvm-readobj -file-headers -sections %t2 | FileCheck %s |
| 4 | |
| 5 | !ELF |
| 6 | FileHeader: |
| 7 | Class: ELFCLASS64 |
| 8 | Data: ELFDATA2LSB |
| 9 | Type: ET_REL |
| 10 | Machine: EM_X86_64 |
| 11 | Sections: |
Jake Ehrlich | 6ad72d0 | 2017-11-27 18:56:01 +0000 | [diff] [blame] | 12 | - Name: .bss |
Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 13 | Type: SHT_NOBITS |
Jake Ehrlich | 6ad72d0 | 2017-11-27 18:56:01 +0000 | [diff] [blame] | 14 | Flags: [ SHF_ALLOC ] |
Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 15 | - Name: .text |
| 16 | Type: SHT_PROGBITS |
| 17 | Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
Jake Ehrlich | 6ad72d0 | 2017-11-27 18:56:01 +0000 | [diff] [blame] | 18 | - Name: .blarg |
Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 19 | Type: SHT_PROGBITS |
| 20 | Flags: [ ] |
Jake Ehrlich | 6ad72d0 | 2017-11-27 18:56:01 +0000 | [diff] [blame] | 21 | - Name: .gnu.warning.foo |
Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 22 | Type: SHT_PROGBITS |
Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 23 | |
Jake Ehrlich | 6ad72d0 | 2017-11-27 18:56:01 +0000 | [diff] [blame] | 24 | # CHECK: SectionHeaderCount: 5 |
Jake Ehrlich | fabddf1 | 2017-11-13 22:02:07 +0000 | [diff] [blame] | 25 | |
Jake Ehrlich | 6ad72d0 | 2017-11-27 18:56:01 +0000 | [diff] [blame] | 26 | # CHECK: Name: .bss |
| 27 | # CHECK: Name: .text |
| 28 | # CHECK: Name: .gnu.warning.foo |
| 29 | # CHECK: Name: .shstrtab |