Home | History | Annotate | Download | only in Object
      1 # invalid-phdr.elf is generated by creating a simple elf file with yaml2obj:
      2 # !ELF
      3 # FileHeader:
      4 #   Class:           ELFCLASS64
      5 #   Data:            ELFDATA2LSB
      6 #   Type:            ET_EXEC
      7 #   Machine:         EM_X86_64
      8 # Sections:
      9 #   - Name:            .text
     10 #     Type:            SHT_PROGBITS
     11 #     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
     12 #     AddressAlign:    0x0000000000001000
     13 #     Content:         "00000000"
     14 # ProgramHeaders:
     15 #   - Type: PT_LOAD
     16 #     Flags: [ PF_X, PF_R ]
     17 #     VAddr: 0xAAAA1000
     18 #     PAddr: 0xFFFF1000
     19 #     Sections:
     20 #       - Section: .text
     21 #
     22 # Then editing the e_phoff in with a hexeditor to set it to 0xffffff
     23 RUN: not llvm-objdump -private-headers %p/Inputs/invalid-phdr.elf 2>&1 \
     24 RUN:         | FileCheck %s
     25 
     26 CHECK: LLVM ERROR: Invalid data was encountered while parsing the file
     27