blob: c4291202f0351d82ccd94d202a06588eef657b5c [file] [log] [blame]
// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux %s \
// RUN: -o %t.o
// RUN: ld.lld %t.o -o %t.so -shared
// RUN: llvm-objdump -d %t.so | FileCheck %s
// We used to fail trying to relax this into a pc relocation to an absolute
// value.
// CHECK: movq 4185(%rip), %rax
movq bar@GOTPCREL(%rip), %rax
.data
.global bar
.hidden bar
bar = 42