aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-10-04 15:28:43 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-10-04 15:28:43 +0000
commit01263d35d4c037a882dbfa6364eb0f6c4e0d87a8 (patch)
tree3bcdb9be899d5fe0d5aaca203351c87460f63c4a /lib
parent2e0affb428f49d42a5db705d054492fad98ffd11 (diff)
downloadexternal_llvm-01263d35d4c037a882dbfa6364eb0f6c4e0d87a8.zip
external_llvm-01263d35d4c037a882dbfa6364eb0f6c4e0d87a8.tar.gz
external_llvm-01263d35d4c037a882dbfa6364eb0f6c4e0d87a8.tar.bz2
Correctly compute the relocation when it is not in the first fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/ELFObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp
index 614e396..cc6d51e 100644
--- a/lib/MC/ELFObjectWriter.cpp
+++ b/lib/MC/ELFObjectWriter.cpp
@@ -539,7 +539,7 @@ void ELFObjectWriterImpl::RecordRelocation(const MCAssembler &Asm,
const MCSymbol &SymbolB = RefB->getSymbol();
MCSymbolData &SDB = Asm.getSymbolData(SymbolB);
IsPCRel = true;
- Value += Fixup.getOffset() - Layout.getSymbolAddress(&SDB);
+ Value += Layout.getFragmentOffset(Fragment) + Fixup.getOffset() - Layout.getSymbolAddress(&SDB);
}
// Check that this case has already been fully resolved before we get