File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 47
47
#include " llvm/Support/ConvertUTF.h"
48
48
#include " llvm/Support/Path.h"
49
49
#include " llvm/Support/SaveAndRestore.h"
50
+ #include " llvm/Target/TargetMachine.h"
50
51
#include " llvm/Transforms/Utils/ModuleUtils.h"
51
52
52
53
#include " Callee.h"
@@ -2570,7 +2571,11 @@ static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
2570
2571
// rdar://problem/50968433: Unnamed_addr constants appear to get emitted
2571
2572
// with incorrect alignment by the LLVM JIT in some cases. Don't use
2572
2573
// unnamed_addr as a workaround.
2573
- if (!IGM.getOptions ().UseJIT ) {
2574
+ // rdar://problem/53836960: i386 ld64 also mis-links relative references
2575
+ // to GOT entries.
2576
+ if (!IGM.getOptions ().UseJIT
2577
+ && (!IGM.Triple .isOSDarwin ()
2578
+ || IGM.Triple .getArch () != llvm::Triple::x86)) {
2574
2579
gotEquivalent->setUnnamedAddr (llvm::GlobalValue::UnnamedAddr::Global);
2575
2580
} else {
2576
2581
ApplyIRLinkage (IRLinkage::InternalLinkOnceODR)
You can’t perform that action at this time.
0 commit comments