Page MenuHomeFreeBSD

D22913.diff
No OneTemporary

D22913.diff

Index: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
===================================================================
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -4952,7 +4952,12 @@
if (auto *G = dyn_cast<GlobalAddressSDNode>(Callee))
GV = G->getGlobal();
bool Local = TM.shouldAssumeDSOLocal(*Mod, GV);
- bool UsePlt = !Local && Subtarget.isTargetELF() && !isPPC64;
+ // The PLT is only used in 32-bit ELF PIC mode. Attempting to use the PLT in
+ // a static relocation model causes some versions of GNU LD (2.17.50, at
+ // least) to force BSS-PLT, instead of secure-PLT, even if all objects are
+ // built with secure-PLT.
+ bool UsePlt = !Local && Subtarget.isTargetELF() && !isPPC64 &&
+ Subtarget.getTargetMachine().getRelocationModel() == Reloc::PIC_;
// If the callee is a GlobalAddress/ExternalSymbol node (quite common,
// every direct call is) turn it into a TargetGlobalAddress /

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 9:29 PM (15 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14871167
Default Alt Text
D22913.diff (1 KB)

Event Timeline