brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · ab560ec Raw
60 lines · plain
1## Check llvm-objdump -h can handle ELF files without section info.2## Only PT_LOAD segments with the PF_X flag will be displayed as fake sections.3 4# RUN: yaml2obj %s -o %t5# RUN: llvm-objdump -h %t | FileCheck %s6 7# CHECK:      Sections:8# CHECK-NEXT: Idx Name          Size     VMA              Type9# CHECK-NEXT:   0 PT_LOAD#1     00000100 0000000000400000 TEXT10# CHECK-NEXT:   1 PT_LOAD#3     00000200 0000000000600400 TEXT11# CHECK-NOT:  {{.}}12 13!ELF14FileHeader:15  Class:           ELFCLASS6416  Data:            ELFDATA2LSB17  Type:            ET_CORE18  Machine:         EM_X86_6419Sections:20  - Type:            SectionHeaderTable21    NoHeaders:       true22  - Type:            Fill23    Name:            code124    Pattern:         "cc"25    Size:            0x10026    Offset:          0x20027  - Type:            Fill28    Name:            data129    Pattern:         "aa55"30    Size:            0x10031    Offset:          0x30032  - Type:            Fill33    Name:            code234    Pattern:         "ff"35    Size:            0x20036    Offset:          0x40037ProgramHeaders:38  - Type:            PT_PHDR39    Flags:           [ PF_X ]40    VAddr:           0x40000041    MemSize:         0x10042  - Type:            PT_LOAD43    Flags:           [ PF_X ]44    VAddr:           0x40000045    MemSize:         0x10046    FirstSec:        code147    LastSec:         code148  - Type:            PT_LOAD49    Flags:           [ PF_R ]50    VAddr:           0x50030051    MemSize:         0x10052    FirstSec:        data153    LastSec:         data154  - Type:            PT_LOAD55    Flags:           [ PF_R, PF_X ]56    VAddr:           0x60040057    MemSize:         0x20058    FirstSec:        code259    LastSec:         code260