Don't omit the constant when computing a cross-section relative relocation.

Differential Revision: http://reviews.llvm.org/D9692

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237327 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andy Ayers
2015-05-14 01:10:41 +00:00
parent d8b3f0d785
commit edd2bb863e
2 changed files with 98 additions and 1 deletions

View File

@@ -738,7 +738,7 @@ void WinCOFFObjectWriter::RecordRelocation(
int64_t OffsetOfRelocation =
Layout.getFragmentOffset(Fragment) + Fixup.getOffset();
FixedValue = OffsetOfRelocation - OffsetOfB;
FixedValue = (OffsetOfRelocation - OffsetOfB) + Target.getConstant();
} else {
FixedValue = Target.getConstant();
}