summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-07 03:50:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-07 03:50:14 +0000
commit2eabaae45970af24de2c3ada4fec314a8ecc97d5 (patch)
treeda52b3ac01c05d4ee59bd3e37ebefb7db936ab7a /llvm/lib
parent1576fd71726263627f82b8f9476f68dec574e959 (diff)
downloadbcm5719-llvm-2eabaae45970af24de2c3ada4fec314a8ecc97d5.tar.gz
bcm5719-llvm-2eabaae45970af24de2c3ada4fec314a8ecc97d5.zip
Fix pcrel relocations that cross sections.
llvm-svn: 121107
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/MachObjectWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index fa3b4dce688..6e0c4d20d32 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud