• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# 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
29