Use getSymbolOffset on the COFF writer.

llvm-svn: 120979
This commit is contained in:
Rafael Espindola 2010-12-06 03:24:04 +00:00
parent ac60adb38d
commit 45790b82af
1 changed files with 1 additions and 1 deletions

View File

@ -661,7 +661,7 @@ void WinCOFFObjectWriter::RecordRelocation(const MCAssembler &Asm,
const MCSymbol *B = &Target.getSymB()->getSymbol();
MCSymbolData &B_SD = Asm.getSymbolData(*B);
FixedValue = Layout.getSymbolAddress(&A_SD) - Layout.getSymbolAddress(&B_SD);
FixedValue = Layout.getSymbolOffset(&A_SD) - Layout.getSymbolOffset(&B_SD);
// In the case where we have SymbA and SymB, we just need to store the delta
// between the two symbols. Update FixedValue to account for the delta, and