[LLVMbugs] [Bug 8320] New: PECOFF: IMAGE_SYM_DTYPE_FUNCTION is incompatible to GNU binutils

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 6 19:24:52 PDT 2010


           Summary: PECOFF: IMAGE_SYM_DTYPE_FUNCTION is incompatible to
                    GNU binutils
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            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

GNU ld/PECOFF assumes .type 0x20 for function.
LLVM emits .type 0x200, and GNU ld complains with warnings.
(it might be harmless for execution)

| c:/msysgit/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
Warning: type of symbol `_main' changed from 32 to 512 in

in include/llvm/Support/COFF.h,

    IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type.

    /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))

it should be not 8 but 4 for compatibility to GNU binutils.

FYI I have never met .type 0x200 even in object files emitted by MSVS8.

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