2016-10-28 01:28:56 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -relax-relocations -triple=x86_64-pc-linux %s \
|
|
|
|
// RUN: -o %t.o
|
2017-10-06 17:37:44 +08:00
|
|
|
// RUN: ld.lld --hash-style=sysv %t.o -o %t.so -shared
|
2016-10-28 01:28:56 +08:00
|
|
|
// 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
|