diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-12-17 05:50:29 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-12-17 05:50:29 +0000 |
| commit | 2ee6c9b8c98cf224e15a0e75128ad1f4e331d5c5 (patch) | |
| tree | 2ad5609b1ebf96f85e9dfbc5249e52f67d6d88f2 /llvm/lib/MC/MachObjectWriter.cpp | |
| parent | 4da4e2573b2399f5225c60a7bf8729dc756c9977 (diff) | |
| download | llvm-2ee6c9b8c98cf224e15a0e75128ad1f4e331d5c5.zip llvm-2ee6c9b8c98cf224e15a0e75128ad1f4e331d5c5.tar.gz llvm-2ee6c9b8c98cf224e15a0e75128ad1f4e331d5c5.tar.bz2 | |
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).
llvm-svn: 122042
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
| -rw-r--r-- | llvm/lib/MC/MachObjectWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp index 17615ee..6ebc782 100644 --- a/llvm/lib/MC/MachObjectWriter.cpp +++ b/llvm/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) |
