summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-05-18 22:07:20 +0000
committerTim Northover <tnorthover@apple.com>2015-05-18 22:07:20 +0000
commitd6223a24718df3c30b67422c2eb6d0e93af9c4e8 (patch)
tree90c204c8a88093677b3c9d9e803eb61fec5a467a /llvm/lib
parent7a4d1090bc1aa4bd6649ca568c28199cb1941a90 (diff)
downloadbcm5719-llvm-d6223a24718df3c30b67422c2eb6d0e93af9c4e8.tar.gz
bcm5719-llvm-d6223a24718df3c30b67422c2eb6d0e93af9c4e8.zip
AArch64: work around ld64 bug more aggressively.
ld64 currently mishandles internal pointer relocations (i.e. ARM64_RELOC_UNSIGNED referred to by section & offset rather than symbol). The existing __cfstring clause was an early discovery and workaround for this, but the problem is wider and we should avoid such relocations wherever possible for now. This code should be reverted to allowing internal relocations as soon as possible. PR23437. llvm-svn: 237621
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
index 25343244890..99f30bcac7e 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp
@@ -131,14 +131,13 @@ static bool canUseLocalRelocation(const MCSectionMachO &Section,
return false;
if (RefSec.getSegmentName() == "__DATA" &&
- RefSec.getSectionName() == "__cfstring")
- return false;
-
- if (RefSec.getSegmentName() == "__DATA" &&
RefSec.getSectionName() == "__objc_classrefs")
return false;
- return true;
+ // FIXME: ld64 currently handles internal pointer-sized relocations
+ // incorrectly (applying the addend twice). We should be able to return true
+ // unconditionally by this point when that's fixed.
+ return false;
}
void AArch64MachObjectWriter::RecordRelocation(
OpenPOWER on IntegriCloud