[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / x86-64-relax-offset.s
blob3e8039b6374bf78297b52e8a38df2f4213d0ddb9
1 // REQUIRES: x86
3 /// Test we use input r_offset when deciding if R_X86_64_GOTPCRELX
4 /// relaxation is applicable.
6 // RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux %s \
7 // RUN: -o %t.o
8 // RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux \
9 // RUN: %p/Inputs/x86-64-relax-offset.s -o %t2.o
10 // RUN: ld.lld %t2.o %t.o -o %t.so -shared
11 // RUN: llvm-objdump -d %t.so | FileCheck %s
13 mov foo@gotpcrel(%rip), %rax
14 nop
16 // CHECK: leaq -11(%rip), %rax
17 // CHECK-NEXT: nop