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 x1 %t2 | FileCheck %s --ignore-case |
Dmitri Gribenko | a89e5a4 | 2019-10-10 14:26:54 +0000 | [diff] [blame] | 4 | |
| 5 | !ELF |
| 6 | FileHeader: |
| 7 | Class: ELFCLASS64 |
| 8 | Data: ELFDATA2LSB |
| 9 | Type: ET_EXEC |
| 10 | Machine: EM_X86_64 |
| 11 | Sections: |
| 12 | - Name: .text |
| 13 | Type: SHT_PROGBITS |
| 14 | Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| 15 | Address: 0x1000 |
| 16 | AddressAlign: 0x0000000000001000 |
| 17 | Content: "c3c3c3c3" |
| 18 | - Name: .data |
| 19 | Type: SHT_PROGBITS |
| 20 | Flags: [ SHF_ALLOC ] |
| 21 | Address: 0x1008 |
| 22 | AddressAlign: 0x0000000000000008 |
| 23 | Content: "3232" |
| 24 | ProgramHeaders: |
| 25 | - Type: PT_LOAD |
| 26 | Flags: [ PF_X, PF_R ] |
| 27 | VAddr: 0x1000 |
| 28 | PAddr: 0x1000 |
| 29 | Align: 0x1000 |
| 30 | Sections: |
| 31 | - Section: .text |
| 32 | - Type: PT_LOAD |
| 33 | Flags: [ PF_R, PF_W ] |
| 34 | VAddr: 0x1008 |
| 35 | PAddr: 0x1008 |
| 36 | Align: 0x1000 |
| 37 | Sections: |
| 38 | - Section: .data |
| 39 | |
| 40 | # CHECK: 0000000 c3 c3 c3 c3 00 00 00 00 32 32 |