blob: 123f4736ca029b230f96842c982656bf33c54f40 [file] [log] [blame]
Jake Ehrlichef3b80c2017-11-30 20:14:53 +00001# RUN: yaml2obj %s > %t
2# RUN: llvm-objcopy -O binary -j .text %t %t2
3# RUN: llvm-objcopy -O binary -only-keep .text %t %t3
4# RUN: od -t x1 %t2 | FileCheck %s
5# RUN: wc -c %t2 | FileCheck %s --check-prefix=SIZE
6# RUN: diff %t2 %t3
7
8!ELF
9FileHeader:
10 Class: ELFCLASS64
11 Data: ELFDATA2LSB
12 Type: ET_EXEC
13 Machine: EM_X86_64
14Sections:
15 - Name: .text
16 Type: SHT_PROGBITS
17 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
18 AddressAlign: 0x0000000000001000
19 Content: "DEADBEEF"
20ProgramHeaders:
21- Type: PT_LOAD
22 Flags: [ PF_X, PF_R ]
23 Sections:
24 - Section: .text
25
26#CHECK: 0000000 de ad be ef
27
28#SIZE: 4