[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / linkerscript / absolute2.s
blob33158545fe619a5287bc07045049b1d693be7751
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4 # RUN: echo "SECTIONS { .text : { *(.text) } foo = ABSOLUTE(_start) + _start; };" > %t.script
5 # RUN: ld.lld -o %t --script %t.script %t.o
6 # RUN: llvm-objdump -t %t | FileCheck %s
8 # RUN: echo "SECTIONS { .text : { *(.text) } foo = _start + ABSOLUTE(_start); };" > %t.script
9 # RUN: ld.lld -o %t --script %t.script %t.o
10 # RUN: llvm-objdump -t %t | FileCheck %s
12 # CHECK: 0000000000000001 g .text 0000000000000000 _start
13 # CHECK: 0000000000000002 g .text 0000000000000000 foo
15 .global _start
16 nop
17 _start: