mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-10 04:54:50 +00:00
ARM/ELF: Restore original (pre-r251322) logic for deciding whether to use GOT.
Unbreaks linking with gold, which cannot resolve direct relocations referring to global symbols. llvm-svn: 251342
This commit is contained in:
parent
0b7b424253
commit
9e870daa98
@ -2940,7 +2940,7 @@ bool ARMFastISel::tryToFoldLoadIntoMI(MachineInstr *MI, unsigned OpNo,
|
||||
unsigned ARMFastISel::ARMLowerPICELF(const GlobalValue *GV,
|
||||
unsigned Align, MVT VT) {
|
||||
bool UseGOT_PREL =
|
||||
!(GV->hasHiddenVisibility() || GV->isStrongDefinitionForLinker());
|
||||
!(GV->hasHiddenVisibility() || GV->hasLocalLinkage());
|
||||
|
||||
LLVMContext *Context = &MF->getFunction()->getContext();
|
||||
unsigned ARMPCLabelIndex = AFI->createPICLabelUId();
|
||||
|
@ -2637,7 +2637,7 @@ SDValue ARMTargetLowering::LowerGlobalAddressELF(SDValue Op,
|
||||
const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
|
||||
if (getTargetMachine().getRelocationModel() == Reloc::PIC_) {
|
||||
bool UseGOT_PREL =
|
||||
!(GV->hasHiddenVisibility() || GV->isStrongDefinitionForLinker());
|
||||
!(GV->hasHiddenVisibility() || GV->hasLocalLinkage());
|
||||
|
||||
MachineFunction &MF = DAG.getMachineFunction();
|
||||
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
|
||||
|
Loading…
Reference in New Issue
Block a user