From 54cfd42c3388bc40f93e5087376509b362ac943f Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 3 Aug 2010 05:02:46 +0000 Subject: MC: Fix symbol fragment offsets in COFF. Patch by Cameron Esfahani! llvm-svn: 110104 --- llvm/lib/MC/WinCOFFObjectWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp') diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index afc40a528d9..b7a669252c1 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/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. -- cgit v1.2.3