From: James Y Knight Date: Tue, 21 Jun 2016 05:40:41 +0000 (+0000) Subject: Revert "Change RelaxELFRelocations for llc." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02fb7c69c2100124b83c833732897c803eab83f9;p=llvm Revert "Change RelaxELFRelocations for llc." This reverts commit r273019. From email I sent to list: > I don't think this makes sense. Either the linker you're using supports > this feature, or it doesn't. Having it enabled for llc if your linker > doesn't support it is not fun. > > Further note that this also affects basically all other code using llvm > libraries -- other than Clang, which explicitly sets it back to false by > default, unless you set the ENABLE_X86_RELAX_RELOCATIONS cmake flag to > true. > > If you want to enable the relax mode across all llvm tools in some > circumstances, I think it should be via moving the cmake flag from clang > down into llvm. > > I'm going to revert this commit, since I both think it intrinsically > doesn't make sense to do this, and because it's breaking some of our > tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273245 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h index 508b5d940b5..1de8a5baacc 100644 --- a/include/llvm/Target/TargetOptions.h +++ b/include/llvm/Target/TargetOptions.h @@ -98,7 +98,7 @@ namespace llvm { GuaranteedTailCallOpt(false), StackAlignmentOverride(0), StackSymbolOrdering(true), EnableFastISel(false), UseInitArray(false), DisableIntegratedAS(false), CompressDebugSections(false), - RelaxELFRelocations(true), FunctionSections(false), + RelaxELFRelocations(false), FunctionSections(false), DataSections(false), UniqueSectionNames(true), TrapUnreachable(false), EmulatedTLS(false), FloatABIType(FloatABI::Default), AllowFPOpFusion(FPOpFusion::Standard), Reciprocals(TargetRecip()), diff --git a/test/CodeGen/X86/relax-reloc.ll b/test/CodeGen/X86/relax-reloc.ll deleted file mode 100644 index aa55de0c7a7..00000000000 --- a/test/CodeGen/X86/relax-reloc.ll +++ /dev/null @@ -1,15 +0,0 @@ -; RUN: llc %s -o %t.o -filetype=obj -relocation-model=pic -; RUN: llvm-readobj -r %t.o | FileCheck %s -; CHECK: Section ({{.}}) .rela.text { -; CHECK-NEXT: 0x3 R_X86_64_REX_GOTPCRELX a 0xFFFFFFFFFFFFFFFC -; CHECK-NEXT: } - -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -@a = external global i32 - -define i32 @f() { - %t = load i32, i32* @a - ret i32 %t -}