23 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3# RUN: echo "SECTIONS { \4# RUN: . = 0xffffffff80000200; \5# RUN: .text : AT (0x4200) { *(.text) } \6# RUN: }" > %t.script7# RUN: ld.lld %t.o --script %t.script -o %t8# RUN: llvm-readelf -l %t | FileCheck %s9 10# Test that we put the header in the first PT_LOAD. We used to create a PT_LOAD11# just for it and it would have a different virtual to physical address delta.12 13# CHECK: Program Headers:14# CHECK: Type Offset VirtAddr PhysAddr15# CHECK-NEXT: PHDR 0x000040 0xffffffff80000040 0xffffffff8000004016# CHECK-NEXT: LOAD 0x000000 0xffffffff80000000 0xffffffff8000000017# CHECK-NEXT: LOAD 0x000200 0xffffffff80000200 0x000000000000420018# CHECK-NOT: LOAD19 20.global _start21_start:22nop23