1// REQUIRES: x86
2
3/// Test we use input r_offset when deciding if R_X86_64_GOTPCRELX
4/// relaxation is applicable.
5
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
12
13        mov foo@gotpcrel(%rip), %rax
14        nop
15
16// CHECK:      leaq    -11(%rip), %rax
17// CHECK-NEXT: nop
18