53 lines · plain
1## Check that llvm-bolt correctly processes a binary with program headers and2## corresponding sections specified in non-ascending address order.3 4RUN: split-file %s %t5RUN: yaml2obj %t/yaml -o %t.exe --max-size=06RUN: llvm-bolt %t.exe -o %t.bolt --allow-stripped7RUN: llvm-readelf -WS %t.bolt | FileCheck %s8 9CHECK: .a PROGBITS 0000000000400000 [[#%.6x, OFFSET:]] 00000110CHECK-NEXT: .b PROGBITS 0000000000000000 [[#%.6x, OFFSET+1]] 00000111CHECK-NEXT: .c PROGBITS 0000000000600000 [[#%.6x, OFFSET+2]] 00000112 13#--- yaml14--- !ELF15FileHeader:16 Class: ELFCLASS6417 Data: ELFDATA2LSB18 Type: ET_EXEC19 Machine: EM_X86_6420ProgramHeaders:21 - Type: PT_LOAD22 FirstSec: .a23 LastSec: .a24 VAddr: 0x40000025 - Type: PT_LOAD26 FirstSec: .b27 LastSec: .b28 VAddr: 0x029 - Type: PT_LOAD30 FirstSec: .c31 LastSec: .c32 VAddr: 0x60000033Sections:34 - Name: .a35 Type: SHT_PROGBITS36 Flags: [ SHF_ALLOC ]37 Content: 0038 AddressAlign: 0x139 Address: 0x40000040 - Name: .b41 Type: SHT_PROGBITS42 Flags: [ SHF_ALLOC ]43 Content: 0044 AddressAlign: 0x145 Address: 0x046 - Name: .c47 Type: SHT_PROGBITS48 Flags: [ SHF_ALLOC ]49 Content: 0050 AddressAlign: 0x151 Address: 0x60000052...53