summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2015-11-18 15:24:17 +0000
committerManuel Klimek <klimek@google.com>2015-11-18 15:24:17 +0000
commit272d3f17fcaa1018ddc15eb5781ae6064c760e95 (patch)
treee9cecbfc41319a8c0fd69a8b0cc957b96ccf543d /llvm/lib/MC
parentbba11df1850e4ad220fb2f53627239cfb503f2a2 (diff)
downloadbcm5719-llvm-272d3f17fcaa1018ddc15eb5781ae6064c760e95.tar.gz
bcm5719-llvm-272d3f17fcaa1018ddc15eb5781ae6064c760e95.zip
Fix bug where WinCOFFObjectWriter would assume starting from an empty output.
Starting on an input stream that is not at offset 0 would trigger the assert in WinCOFFObjectWriter.cpp:1065: assert(getStream().tell() <= (*i)->Header.PointerToRawData && "Section::PointerToRawData is insane!"); llvm-svn: 253464
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index 7eb470353b7..875a61425f1 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -962,7 +962,7 @@ void WinCOFFObjectWriter::writeObject(MCAssembler &Asm,
// Assign file offsets to COFF object file structures.
- unsigned offset = 0;
+ unsigned offset = getInitialOffset();
if (UseBigObj)
offset += COFF::Header32Size;
OpenPOWER on IntegriCloud