[LLVMbugs] [Bug 8338] New: MC-COFF: section.bss always has .size as 0

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Oct 8 08:55:14 PDT 2010


           Summary: MC-COFF: section.bss always has .size as 0
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: ASSIGNED
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: bigcheesegs at gmail.com
        ReportedBy: geek4civic at gmail.com
                CC: llvmbugs at cs.uiuc.edu

It seems mccoff emits .bss with size 0 in section headers.

In getSectionFileSize(), *virtual* section is treated as size zero.

A trivial patch. Now I can build FileCheck.exe and tblgen.exe with clang++
-integrated-as. opt.exe, clang.exe &c still crash for me.

--- a/lib/MC/WinCOFFObjectWriter.cpp
+++ b/lib/MC/WinCOFFObjectWriter.cpp
@@ -799,7 +799,7 @@ void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm,
     if (Sec->Number == -1)

-    Sec->Header.SizeOfRawData = Layout.getSectionFileSize(i);
+    Sec->Header.SizeOfRawData = Layout.getSectionAddressSize(i);

     if (IsPhysicalSection(Sec)) {
       Sec->Header.PointerToRawData = offset;

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list