1# RUN: yaml2obj %s -o %t
2
3## If there are no sections with different LMA to VMA,
4## we do not display LMA column.
5# RUN: llvm-objdump --section-headers %t | FileCheck %s
6
7# CHECK:      Sections:
8# CHECK-NEXT: Idx Name  Size     VMA              Type
9# CHECK-NEXT:   0       00000000 0000000000000000
10# CHECK-NEXT:   1 .text 00000004 0000000000001000 TEXT
11# CHECK-NEXT:   2 .init 00000004 0000000000001010 TEXT
12# CHECK-NEXT:   3 .data 00000004 0000000000002000 DATA
13
14## Check we can trigger displaying the LMA column with --show-lma.
15# RUN: llvm-objdump --section-headers --show-lma %t |\
16# RUN:   FileCheck %s --check-prefix=LMA
17
18# LMA:      Sections:
19# LMA-NEXT: Idx Name  Size     VMA              LMA              Type
20# LMA-NEXT:   0       00000000 0000000000000000 0000000000000000
21# LMA-NEXT:   1 .text 00000004 0000000000001000 0000000000001000 TEXT
22# LMA-NEXT:   2 .init 00000004 0000000000001010 0000000000001010 TEXT
23# LMA-NEXT:   3 .data 00000004 0000000000002000 0000000000002000 DATA
24
25!ELF
26FileHeader:
27  Class:           ELFCLASS64
28  Data:            ELFDATA2LSB
29  Type:            ET_EXEC
30  Machine:         EM_X86_64
31Sections:
32  - Name:            .text
33    Type:            SHT_PROGBITS
34    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
35    Content:         "00000000"
36    Address:         0x00001000
37  - Name:            .init
38    Type:            SHT_PROGBITS
39    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
40    Content:         "00000000"
41    Address:         0x00001010
42  - Name:            .data
43    Type:            SHT_PROGBITS
44    Flags:           [ SHF_ALLOC ]
45    Content:         "00000000"
46    Address:         0x00002000
47ProgramHeaders:
48  - Type:     PT_LOAD
49    Flags:    [ PF_X, PF_R ]
50    VAddr:    0x00001000
51    FirstSec: .text
52    LastSec:  .init
53  - Type:     PT_LOAD
54    Flags:    [ PF_R ]
55    VAddr:    0x00002000
56    FirstSec: .data
57    LastSec:  .data
58