mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

MC default was flipped in 2016. CMake ENABLE_X86_RELAX_RELOCATIONS defaults to on in 2020 (c41a18cf61790fc898dcda1055c3efbf442c14c0). It makes sense for the CodeGenOptions::RelaxELFRelocations to match, so that most -cc1/-cc1as command lines won't have this option. This also fixes a minor issue: -fno-plt -S will now use GOT for __tls_get_addr calls, matching -fno-plt -c.
11 lines
254 B
C
11 lines
254 B
C
// REQUIRES: x86-registered-target
|
|
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-obj %s -mrelocation-model pic -o %t
|
|
// RUN: llvm-readobj -r %t | FileCheck %s
|
|
|
|
// CHECK: R_X86_64_REX_GOTPCRELX foo
|
|
|
|
extern int foo;
|
|
int *f(void) {
|
|
return &foo;
|
|
}
|