• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: x86
2; RUN: llvm-as %s -o %t.o
3; RUN: ld.lld -save-temps -shared %t.o -o %t.so
4; RUN: llvm-readobj -r %t.so.lto.o | FileCheck %s
5
6; Test that we produce R_X86_64_REX_GOTPCRELX instead of R_X86_64_GOTPCREL
7; CHECK: R_X86_64_REX_GOTPCRELX foo
8
9target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
10target triple = "x86_64-unknown-linux-gnu"
11
12@foo = external global i32
13define i32 @bar() {
14  %t = load i32, i32* @foo
15  ret i32 %t
16}
17