• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s -o %t
2
3## Check we print both VMA and LMA correctly when dumping section headers.
4# RUN: llvm-objdump --section-headers %t | FileCheck %s
5
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
12
13!ELF
14FileHeader:
15  Class:           ELFCLASS64
16  Data:            ELFDATA2LSB
17  Type:            ET_EXEC
18  Machine:         EM_X86_64
19Sections:
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
35ProgramHeaders:
36  - Type:     PT_LOAD
37    Flags:    [ PF_X, PF_R ]
38    VAddr:    0x00001000
39    PAddr:    0x00002000
40    FirstSec: .text
41    LastSec:  .init
42  - Type:     PT_LOAD
43    Flags:    [ PF_R ]
44    VAddr:    0x00002000
45    PAddr:    0x00003000
46    FirstSec: .data
47    LastSec:  .data
48