[LLVMdev] Win32 COFF Support

Michael Spencer bigcheesegs at gmail.com
Tue Sep 28 16:39:08 PDT 2010


On Sun, Sep 26, 2010 at 5:27 PM, Nathan Jeffords
<blunted2night at gmail.com> wrote:
> Hi guys,
> While trying to get dwarf debugging information to work with Win32 COFF
> targets, I came across a couple of issues with the current implementation
> of WinCOFFObjectWriter. Emitting empty section causes debug information to
> invalid, as the presence of certain debug section implies available
> information, and emission of labels as symbols confused gdb about the
> structure of the program.
> The attached patch allows the WinCOFFObjectWriter to drop empty sections,
> and label symbols. It converts relocations targeted at symbols into
> relocations relative to the containing section.
> I have not run the tests in the '/test/MC/COFF', but have run through the
> unit-test framework for my compiler and generated some text executables with
> clang and everything looks to be in order. It may change the output of
> the  '/test/MC/COFF' if the string references are emitted as temporaries.
> -Nathan

http://llvm.org/bugs/show_bug.cgi?id=8248

It seems that there actually is a bug. I thought it was due to
something else, but reverting this patch fixes it. Why/when exactly
does gdb expect IMAGE_SYM_CLASS_LABEL?

- Michael Spencer




More information about the llvm-dev mailing list