summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index 82c9fe76758..ab6fc2be633 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -620,14 +620,9 @@ void WinCOFFObjectWriter::writeSection(MCAssembler &Asm,
// Write the section contents.
if (Sec.Header.PointerToRawData != 0) {
- assert(W.OS.tell() <= Sec.Header.PointerToRawData &&
+ assert(W.OS.tell() == Sec.Header.PointerToRawData &&
"Section::PointerToRawData is insane!");
- unsigned PaddingSize = Sec.Header.PointerToRawData - W.OS.tell();
- assert(PaddingSize < 4 &&
- "Should only need at most three bytes of padding!");
- W.OS.write_zeros(PaddingSize);
-
uint32_t CRC = writeSectionContents(Asm, Layout, MCSec);
// Update the section definition auxiliary symbol to record the CRC.
@@ -912,10 +907,7 @@ void WinCOFFObjectWriter::assignFileOffsets(MCAssembler &Asm,
Sec->Header.SizeOfRawData = Layout.getSectionAddressSize(&Section);
if (IsPhysicalSection(Sec)) {
- // Align the section data to a four byte boundary.
- Offset = alignTo(Offset, 4);
Sec->Header.PointerToRawData = Offset;
-
Offset += Sec->Header.SizeOfRawData;
}
OpenPOWER on IntegriCloud