1# REQUIRES: x86
2
3## Don't relax R_X86_64_GOTPCRELX to an absolute symbol.
4## In -no-pie mode, it can be relaxed, but it may not worth it.
5
6# RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64 %s -o %t.o
7# RUN: ld.lld %t.o -o %t.so -shared
8# RUN: llvm-objdump -d %t.so | FileCheck %s
9
10# CHECK: movq  4209(%rip), %rax
11
12	movq    bar@GOTPCREL(%rip), %rax
13        .data
14        .global bar
15        .hidden bar
16        bar = 42
17