diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-07 03:50:14 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-07 03:50:14 +0000 |
commit | bf60dad984e296d43a8a6b33e8c528e8c8a24394 (patch) | |
tree | 7ba7257074bfb74718a647cbbea4db9051013383 /lib/MC/MachObjectWriter.cpp | |
parent | b9949b297039a2fd3bae366d5da88d432012ce08 (diff) |
Fix pcrel relocations that cross sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | lib/MC/MachObjectWriter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index fa3b4dce68..6e0c4d20d3 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -898,9 +898,9 @@ public: // The index is the section ordinal (1-based). Index = SD->getFragment()->getParent()->getOrdinal() + 1; FixedValue += getSectionAddress(SD->getFragment()->getParent()); - if (IsPCRel) - FixedValue -= getSectionAddress(Fragment->getParent()); } + if (IsPCRel) + FixedValue -= getSectionAddress(Fragment->getParent()); Type = macho::RIT_Vanilla; } |