[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / image-base.s
blob0ae463fce8a9e314d8aa421e72bf99247eb6b5db
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "SECTIONS { mysym = .; }" > %t.script
6 # RUN: ld.lld %t.o -o %t-default.elf -T %t.script
7 # RUN: llvm-readobj --symbols %t-default.elf | FileCheck %s --check-prefix=DEFAULT
8 # DEFAULT: Name: mysym
9 # DEFAULT-NEXT: Value: 0x0
11 # RUN: ld.lld %t.o -o %t-switch.elf -T %t.script --image-base=0x100000
12 # RUN: llvm-readobj --symbols %t-switch.elf | FileCheck %s --check-prefix=SWITCH
13 # SWITCH: Name: mysym
14 # SWITCH-NEXT: Value: 0x100000
16 .global _start
17 _start:
18 nop