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 | 54cfd42c3388bc40f93e5087376509b362ac943f (patch) | |
| tree | 7c62eb39c35de9537ebadbfc52b929fd634e26b1 /llvm/lib/MC/WinCOFFObjectWriter.cpp | |
| parent | d32764c8a0db64fd2568ba4dbc038600a9fc2bcb (diff) | |
| download | bcm5719-llvm-54cfd42c3388bc40f93e5087376509b362ac943f.tar.gz bcm5719-llvm-54cfd42c3388bc40f93e5087376509b362ac943f.zip | |
MC: Fix symbol fragment offsets in COFF.
Patch by Cameron Esfahani!
llvm-svn: 110104
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
| -rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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. |

