Enable PIC codegen on x86-64/linux

llvm-svn: 46198
This commit is contained in:
Anton Korobeynikov 2008-01-20 13:58:16 +00:00
parent fe3bef091f
commit 28d4302807
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
return (!isDirectCall &&
(GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
(GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode())));
} else if (TM.getRelocationModel() == Reloc::PIC_ && isPICStyleGOT()) {
} else if (isTargetELF()) {
// Extra load is needed for all non-statics.
return (!isDirectCall &&
(GV->isDeclaration() || !GV->hasInternalLinkage()));