Jake Ehrlich | d49c92b | 2017-11-15 19:13:31 +0000 | [diff] [blame] | 1 | # RUN: yaml2obj %s -o %t |
Alexander Shaposhnikov | d688479 | 2018-04-24 05:43:32 +0000 | [diff] [blame] | 2 | # RUN: llvm-objcopy -R .note -O binary %t %t2 |
Jake Ehrlich | d49c92b | 2017-11-15 19:13:31 +0000 | [diff] [blame] | 3 | # RUN: od -Ax -t x1 %t2 | FileCheck %s |
4 | |||||
5 | !ELF | ||||
6 | FileHeader: | ||||
7 | Class: ELFCLASS64 | ||||
8 | Data: ELFDATA2LSB | ||||
9 | Type: ET_EXEC | ||||
10 | Machine: EM_X86_64 | ||||
11 | Sections: | ||||
12 | - Name: .note | ||||
13 | Type: SHT_PROGBITS | ||||
14 | Flags: [ SHF_ALLOC ] | ||||
15 | Address: 0x1000 | ||||
16 | AddressAlign: 0x1000 | ||||
17 | Content: "32323232" | ||||
18 | Size: 32 | ||||
19 | - Name: .rodata | ||||
20 | Flags: [ SHF_ALLOC ] | ||||
21 | Type: SHT_PROGBITS | ||||
22 | Address: 0x1020 | ||||
23 | Size: 4064 | ||||
24 | Content: "DEADBEEF" | ||||
25 | ProgramHeaders: | ||||
26 | - Type: PT_LOAD | ||||
27 | Flags: [ PF_R ] | ||||
28 | VAddr: 0x1000 | ||||
29 | PAddr: 0x1000 | ||||
30 | Sections: | ||||
31 | - Section: .note | ||||
32 | - Section: .rodata | ||||
33 | |||||
34 | # CHECK: 000000 de ad be ef |