55 lines · plain
1# RUN: yaml2obj %s -o %t2 3## .data and .data_copy have the same VMA but different sh_offset values.4## Check that we can still print LMA correctly.5# RUN: llvm-objdump --section-headers %t | FileCheck %s6 7# CHECK: Sections:8# CHECK-NEXT: Idx Name Size VMA LMA Type9# CHECK-NEXT: 0 00000000 0000000000000000 000000000000000010# CHECK-NEXT: 1 .text 00000004 0000000000001000 0000000000002000 TEXT11# CHECK-NEXT: 2 .data 00000004 0000000000002000 0000000000003000 DATA12# CHECK-NEXT: 3 .data_copy 00000004 0000000000002000 0000000000004000 DATA13 14!ELF15FileHeader:16 Class: ELFCLASS6417 Data: ELFDATA2LSB18 Type: ET_EXEC19 Machine: EM_X86_6420Sections:21 - Name: .text22 Type: SHT_PROGBITS23 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]24 Content: "00000000"25 Address: 0x0000100026 - Name: .data27 Type: SHT_PROGBITS28 Flags: [ SHF_ALLOC ]29 Content: "00000000"30 Address: 0x0000200031 - Name: .data_copy32 Type: SHT_PROGBITS33 Flags: [ SHF_ALLOC ]34 Content: "00000000"35 Address: 0x0000200036ProgramHeaders:37 - Type: PT_LOAD38 Flags: [ PF_X, PF_R ]39 VAddr: 0x0000100040 PAddr: 0x0000200041 FirstSec: .text42 LastSec: .text43 - Type: PT_LOAD44 Flags: [ PF_R ]45 VAddr: 0x0000200046 PAddr: 0x0000300047 FirstSec: .data48 LastSec: .data49 - Type: PT_LOAD50 Flags: [ PF_R ]51 VAddr: 0x0000200052 PAddr: 0x0000400053 FirstSec: .data_copy54 LastSec: .data_copy55