File: objdump-no-sectionheaders.test

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (59 lines) | stat: -rw-r--r-- 1,709 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
## Check llvm-objdump -h can handle ELF files without section info.
## Only PT_LOAD segments with the PF_X flag will be displayed as fake sections.

# RUN: yaml2obj %s -o %t
# RUN: llvm-objdump -h %t | FileCheck %s

# CHECK:      Sections:
# CHECK-NEXT: Idx Name          Size     VMA              Type
# CHECK-NEXT:   0 PT_LOAD#1     00000100 0000000000400000 TEXT
# CHECK-NEXT:   1 PT_LOAD#3     00000200 0000000000600400 TEXT
# CHECK-NOT:  {{.}}

!ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_CORE
  Machine:         EM_X86_64
Sections:
  - Type:            SectionHeaderTable
    NoHeaders:       true
  - Type:            Fill
    Name:            code1
    Pattern:         "cc"
    Size:            0x100
    Offset:          0x200
  - Type:            Fill
    Name:            data1
    Pattern:         "aa55"
    Size:            0x100
    Offset:          0x300
  - Type:            Fill
    Name:            code2
    Pattern:         "ff"
    Size:            0x200
    Offset:          0x400
ProgramHeaders:
  - Type:            PT_PHDR
    Flags:           [ PF_X ]
    VAddr:           0x400000
    MemSize:         0x100
  - Type:            PT_LOAD
    Flags:           [ PF_X ]
    VAddr:           0x400000
    MemSize:         0x100
    FirstSec:        code1
    LastSec:         code1
  - Type:            PT_LOAD
    Flags:           [ PF_R ]
    VAddr:           0x500300
    MemSize:         0x100
    FirstSec:        data1
    LastSec:         data1
  - Type:            PT_LOAD
    Flags:           [ PF_R, PF_X ]
    VAddr:           0x600400
    MemSize:         0x200
    FirstSec:        code2
    LastSec:         code2