mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Don't use the GOT for symbols that are not externally visible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
833f25d79e
commit
da5860fa8b
@ -44,9 +44,12 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV,
|
||||
GV->hasCommonLinkage() ||
|
||||
(GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode())));
|
||||
} else if (isTargetELF()) {
|
||||
// Extra load is needed for all non-statics.
|
||||
return (!isDirectCall &&
|
||||
(GV->isDeclaration() || !GV->hasInternalLinkage()));
|
||||
// Extra load is needed for all externally visible.
|
||||
if (isDirectCall)
|
||||
return false;
|
||||
if (GV->hasInternalLinkage() || GV->hasHiddenVisibility())
|
||||
return false;
|
||||
return true;
|
||||
} else if (isTargetCygMing() || isTargetWindows()) {
|
||||
return (GV->hasDLLImportLinkage());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user