Home | History | Annotate | Download | only in llvm-objcopy
      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
      9 FileHeader:
     10   Class:           ELFCLASS64
     11   Data:            ELFDATA2LSB
     12   Type:            ET_EXEC
     13   Machine:         EM_X86_64
     14 Sections:
     15   - Name:            .text
     16     Type:            SHT_PROGBITS
     17     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     18     AddressAlign:    0x0000000000001000
     19     Content:         "DEADBEEF"
     20 ProgramHeaders:
     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