1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t 3# RUN: echo "SECTIONS { . = 0x1000; \ 4# RUN: .aaa : AT(ADDR(.aaa) - 0x500) { *(.aaa) } \ 5# RUN: .bbb : AT(ADDR(.bbb) - 0x500) { *(.bbb) } \ 6# RUN: .ccc : AT(ADDR(.ccc) - 0x500) { *(.ccc) } \ 7# RUN: }" > %t.script 8# RUN: ld.lld %t --script %t.script -o %t2 9# RUN: llvm-readobj -l %t2 | FileCheck %s 10 11# CHECK: Type: PT_LOAD 12# CHECK-NEXT: Offset: 0x1000 13# CHECK-NEXT: VirtualAddress: 0x1000 14# CHECK-NEXT: PhysicalAddress: 0xB00 15# CHECK: Type: PT_LOAD 16# CHECK-NEXT: Offset: 0x1008 17# CHECK-NEXT: VirtualAddress: 0x1008 18# CHECK-NEXT: PhysicalAddress: 0xB08 19# CHECK: Type: PT_LOAD 20# CHECK-NEXT: Offset: 0x1010 21# CHECK-NEXT: VirtualAddress: 0x1010 22# CHECK-NEXT: PhysicalAddress: 0xB10 23 24.global _start 25_start: 26 nop 27 28.section .aaa, "a" 29.quad 0 30 31.section .bbb, "a" 32.quad 0 33 34.section .ccc, "a" 35.quad 0 36