diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-08-03 05:02:46 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-08-03 05:02:46 +0000 |
commit | 237f8fe5df628065874b8590b364d04dfc2686fd (patch) | |
tree | b2139f6bd0ac48079934072daf18b30cc95ac56c /lib/MC/WinCOFFObjectWriter.cpp | |
parent | a69494ee5ec9fdbb38961dc71140629be9cbd601 (diff) |
MC: Fix symbol fragment offsets in COFF.
Patch by Cameron Esfahani!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r-- | lib/MC/WinCOFFObjectWriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp index afc40a528d..b7a669252c 100644 --- a/lib/MC/WinCOFFObjectWriter.cpp +++ b/lib/MC/WinCOFFObjectWriter.cpp @@ -619,7 +619,8 @@ void WinCOFFObjectWriter::WriteObject(const MCAssembler &Asm, COFFSection *coff_section = SectionMap[SymbolData->Fragment->getParent()]; coff_symbol->Data.SectionNumber = coff_section->Number; - coff_symbol->Data.Value = Layout.getFragmentOffset(SymbolData->Fragment); + coff_symbol->Data.Value = Layout.getFragmentOffset(SymbolData->Fragment) + + SymbolData->Offset; } // Update auxiliary symbol info. |