58 lines · plain
1# RUN: yaml2obj %s -o %t2 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 %s6 7# CHECK: Sections:8# CHECK-NEXT: Idx Name Size VMA Type9# CHECK-NEXT: 0 00000000 000000000000000010# CHECK-NEXT: 1 .text 00000004 0000000000001000 TEXT11# CHECK-NEXT: 2 .init 00000004 0000000000001010 TEXT12# CHECK-NEXT: 3 .data 00000004 0000000000002000 DATA13 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=LMA17 18# LMA: Sections:19# LMA-NEXT: Idx Name Size VMA LMA Type20# LMA-NEXT: 0 00000000 0000000000000000 000000000000000021# LMA-NEXT: 1 .text 00000004 0000000000001000 0000000000001000 TEXT22# LMA-NEXT: 2 .init 00000004 0000000000001010 0000000000001010 TEXT23# LMA-NEXT: 3 .data 00000004 0000000000002000 0000000000002000 DATA24 25!ELF26FileHeader:27 Class: ELFCLASS6428 Data: ELFDATA2LSB29 Type: ET_EXEC30 Machine: EM_X86_6431Sections:32 - Name: .text33 Type: SHT_PROGBITS34 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]35 Content: "00000000"36 Address: 0x0000100037 - Name: .init38 Type: SHT_PROGBITS39 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]40 Content: "00000000"41 Address: 0x0000101042 - Name: .data43 Type: SHT_PROGBITS44 Flags: [ SHF_ALLOC ]45 Content: "00000000"46 Address: 0x0000200047ProgramHeaders:48 - Type: PT_LOAD49 Flags: [ PF_X, PF_R ]50 VAddr: 0x0000100051 FirstSec: .text52 LastSec: .init53 - Type: PT_LOAD54 Flags: [ PF_R ]55 VAddr: 0x0000200056 FirstSec: .data57 LastSec: .data58