Revert "[TargetVersion] Only enable on RISC-V and AArch64" (#117110)
[llvm-project.git] / bolt / test / R_ABS.pic.lld.cpp
blobb1396209567e204deee8f042c55a68e2d1710bfc
1 /*
2 * Check that we don't assert on a duplicate static relocation added by lld
3 * against _Z6myfuncv. The same address has a dynamic relocation against it.
5 * This test uses the clang driver + lld and will only succeed on Linux systems
6 * with libc available.
7 * REQUIRES: system-linux
9 * RUN: %clang %cflags -fPIC -shared %s -o %t.so -Wl,-q -fuse-ld=lld
10 * RUN: llvm-bolt %t.so -o %t.so.bolt --relocs
13 unsigned long long myfunc();
15 unsigned long long (*myglobal)() = myfunc;
17 unsigned long long myfunc() {
18 return reinterpret_cast<unsigned long long>(myglobal);