1# RUN: yaml2obj %s -o %t 2 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 %s 6 7# CHECK: Sections: 8# CHECK-NEXT: Idx Name Size VMA LMA Type 9# CHECK-NEXT: 0 00000000 0000000000000000 0000000000000000 10# CHECK-NEXT: 1 .text 00000004 0000000000001000 0000000000002000 TEXT 11# CHECK-NEXT: 2 .data 00000004 0000000000002000 0000000000003000 DATA 12# CHECK-NEXT: 3 .data_copy 00000004 0000000000002000 0000000000004000 DATA 13 14!ELF 15FileHeader: 16 Class: ELFCLASS64 17 Data: ELFDATA2LSB 18 Type: ET_EXEC 19 Machine: EM_X86_64 20Sections: 21 - Name: .text 22 Type: SHT_PROGBITS 23 Flags: [ SHF_ALLOC, SHF_EXECINSTR ] 24 Content: "00000000" 25 Address: 0x00001000 26 - Name: .data 27 Type: SHT_PROGBITS 28 Flags: [ SHF_ALLOC ] 29 Content: "00000000" 30 Address: 0x00002000 31 - Name: .data_copy 32 Type: SHT_PROGBITS 33 Flags: [ SHF_ALLOC ] 34 Content: "00000000" 35 Address: 0x00002000 36ProgramHeaders: 37 - Type: PT_LOAD 38 Flags: [ PF_X, PF_R ] 39 VAddr: 0x00001000 40 PAddr: 0x00002000 41 FirstSec: .text 42 LastSec: .text 43 - Type: PT_LOAD 44 Flags: [ PF_R ] 45 VAddr: 0x00002000 46 PAddr: 0x00003000 47 FirstSec: .data 48 LastSec: .data 49 - Type: PT_LOAD 50 Flags: [ PF_R ] 51 VAddr: 0x00002000 52 PAddr: 0x00004000 53 FirstSec: .data_copy 54 LastSec: .data_copy 55