[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / empty-load.s
blob9e6beb679162c218ea5dab6bc37ae1dc71a86f8d
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: echo "SECTIONS { .rw : { *(.rw) } .text : { *(.text) } }" > %t.script
4 # RUN: ld.lld -o %t1 --script %t.script %t
5 # RUN: llvm-objdump --private-headers %t1 | FileCheck %s
7 ## We expect 2 PT_LOAD segments
8 # CHECK: Program Header:
9 # CHECK-NEXT: LOAD
10 # CHECK-NEXT: filesz {{0x[0-9a-f]+}} memsz {{0x[0-9a-f]+}} flags rw-
11 # CHECK-NEXT: LOAD
12 # CHECK-NEXT: filesz {{0x[0-9a-f]+}} memsz {{0x[0-9a-f]+}} flags r-x
13 # CHECK-NEXT: STACK
14 # CHECK-NEXT: filesz
16 .globl _start
17 _start:
18 jmp _start
20 .section .rw, "aw"
21 .quad 0