Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-objdump / X86 / phdrs-lma.test
blobde1b982c0de781db981549ceb98e90024da8a1cc
1 # RUN: yaml2obj %s > %t
3 ## Check we print both VMA and LMA correctly when dumping section headers.
4 # RUN: llvm-objdump --section-headers %t | FileCheck %s
6 # CHECK:      Sections:
7 # CHECK-NEXT: Idx Name  Size     VMA              LMA              Type
8 # CHECK-NEXT:   0       00000000 0000000000000000 0000000000000000
9 # CHECK-NEXT:   1 .text 00000004 0000000000001000 0000000000002000 TEXT
10 # CHECK-NEXT:   2 .init 00000004 0000000000001010 0000000000001010 TEXT
11 # CHECK-NEXT:   3 .data 00000004 0000000000002000 0000000000003000 DATA
13 !ELF
14 FileHeader:
15   Class:           ELFCLASS64
16   Data:            ELFDATA2LSB
17   Type:            ET_EXEC
18   Machine:         EM_X86_64
19 Sections:
20   - Name:            .text
21     Type:            SHT_PROGBITS
22     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
23     Content:         "00000000"
24     Address:         0x00001000
25   - Name:            .init
26     Type:            SHT_PROGBITS
27     Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
28     Content:         "00000000"
29     Address:         0x00001010
30   - Name:            .data
31     Type:            SHT_PROGBITS
32     Flags:           [ SHF_ALLOC ]
33     Content:         "00000000"
34     Address:         0x00002000
35 ProgramHeaders:
36   - Type: PT_LOAD
37     Flags: [ PF_X, PF_R ]
38     VAddr: 0x00001000
39     PAddr: 0x00002000
40     Sections:
41       - Section: .text
42       - Section: .init
43   - Type: PT_LOAD
44     Flags: [ PF_R ]
45     VAddr: 0x00002000
46     PAddr: 0x00003000
47     Sections:
48       - Section: .data