Dmitri Gribenko | a89e5a4 | 2019-10-10 14:26:54 +0000 | [diff] [blame] | 1 | # RUN: yaml2obj %s -o %t |
| 2 | # RUN: llvm-objcopy -O binary %t %t2 |
Kai Nacke | 42b7cd5 | 2019-10-11 12:50:57 +0000 | [diff] [blame] | 3 | # RUN: od -t x2 %t2 | FileCheck %s --ignore-case |
Dmitri Gribenko | a89e5a4 | 2019-10-10 14:26:54 +0000 | [diff] [blame] | 4 | # RUN: wc -c < %t2 | FileCheck %s --check-prefix=SIZE |
| 5 | |
| 6 | !ELF |
| 7 | FileHeader: |
| 8 | Class: ELFCLASS64 |
| 9 | Data: ELFDATA2LSB |
| 10 | Type: ET_EXEC |
| 11 | Machine: EM_X86_64 |
| 12 | Sections: |
| 13 | - Name: .text |
| 14 | Type: SHT_PROGBITS |
| 15 | Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| 16 | AddressAlign: 0x0000000000001000 |
| 17 | Address: 0x00 |
| 18 | Content: "c3c3c3c3" |
| 19 | - Name: .data |
| 20 | Type: SHT_PROGBITS |
| 21 | Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| 22 | AddressAlign: 0x0000000000000008 |
| 23 | Address: 0x08 |
| 24 | Content: "3232" |
| 25 | ProgramHeaders: |
| 26 | - Type: PT_LOAD |
| 27 | Flags: [ PF_X, PF_R ] |
| 28 | VAddr: 0x00 |
| 29 | Sections: |
| 30 | - Section: .text |
| 31 | - Type: PT_LOAD |
| 32 | Flags: [ PF_R ] |
| 33 | VAddr: 0x08 |
| 34 | Sections: |
| 35 | - Section: .data |
| 36 | |
| 37 | # CHECK: 0000000 c3c3 c3c3 0000 0000 3232 |
| 38 | # SIZE: 10 |