[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / segment-headers.s
blobb3bdad9ea08b30dad9a36642055d36f54bba6484
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 # RUN: echo "SECTIONS { . = 0x2000; .text : AT(0x100000) { *(.text) } }" > %t.script
4 # RUN: ld.lld -o %t --script %t.script %t.o
5 # RUN: llvm-readobj -l %t | FileCheck %s
7 # CHECK: ProgramHeaders [
8 # CHECK-NEXT: ProgramHeader {
9 # CHECK-NEXT: Type: PT_LOAD (0x1)
10 # CHECK-NEXT: Offset: 0x1000
11 # CHECK-NEXT: VirtualAddress: 0x2000
12 # CHECK-NEXT: PhysicalAddress: 0x100000
13 # CHECK-NEXT: FileSize: 1
14 # CHECK-NEXT: MemSize: 1
15 # CHECK-NEXT: Flags [ (0x5)
16 # CHECK-NEXT: PF_R (0x4)
17 # CHECK-NEXT: PF_X (0x1)
18 # CHECK-NEXT: ]
19 # CHECK-NEXT: Alignment: 4096
20 # CHECK-NEXT: }
22 .section .text
23 .global _start
25 _start:
26 ret