summaryrefslogtreecommitdiff
path: root/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-12-17 05:50:29 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-12-17 05:50:29 +0000
commitb87422778c4e7b828e6e846b81fd77509439c622 (patch)
treee5f793d37a506f17dd0554baf27cf3638a2777c1 /lib/MC/MachObjectWriter.cpp
parent32c1c5ae5f2bbf0c13bb1aed71384b86ee6b7cac (diff)
downloadllvm-b87422778c4e7b828e6e846b81fd77509439c622.tar.gz
llvm-b87422778c4e7b828e6e846b81fd77509439c622.tar.bz2
llvm-b87422778c4e7b828e6e846b81fd77509439c622.tar.xz
MC/Mach-O: On second thought, use a custom hook for enabling aggressive
IsSymbolRefDifferenceFullyResolved, it turns out this does change behavior on enough cases for x86-32 that I would rather wait a bit on it. - In practice, we will want to change this eventually because it only means we generate less relocations (it also eliminates the need for the horrible '.set' hack that Darwin requires in some places). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r--lib/MC/MachObjectWriter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index 17615eef69..6ebc782c8e 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/lib/MC/MachObjectWriter.cpp
@@ -1126,6 +1126,9 @@ public:
bool IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,
const MCSymbolRefExpr *A,
const MCSymbolRefExpr *B) const {
+ if (!TargetObjectWriter->useAggressiveSymbolFolding())
+ return false;
+
// The effective address is
// addr(atom(A)) + offset(A)
// - addr(atom(B)) - offset(B)