Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / linkerscript / merge-header-load.s
blob2f22477c6538b2460ccb095eb9b775f0492a3a48
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo "SECTIONS { \
4 # RUN: . = 0xffffffff80000200; \
5 # RUN: .text : AT (0x4200) { *(.text) } \
6 # RUN: }" > %t.script
7 # RUN: ld.lld %t.o --script %t.script -o %t
8 # RUN: llvm-readelf -l %t | FileCheck %s
10 # Test that we put the header in the first PT_LOAD. We used to create a PT_LOAD
11 # just for it and it would have a different virtual to physical address delta.
13 # CHECK: Program Headers:
14 # CHECK: Type Offset VirtAddr PhysAddr
15 # CHECK-NEXT: PHDR 0x000040 0xffffffff80000040 0xffffffff80000040
16 # CHECK-NEXT: LOAD 0x000000 0xffffffff80000000 0xffffffff80000000
17 # CHECK-NEXT: LOAD 0x000200 0xffffffff80000200 0x0000000000004200
18 # CHECK-NOT: LOAD
20 .global _start
21 _start:
22 nop