[LLVMdev] Win32 COFF Support

Nathan Jeffords blunted2night at gmail.com
Sun Sep 26 14:27:57 PDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100926/5fee6e36/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wincoff.patch
Type: application/octet-stream
Size: 16085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100926/5fee6e36/attachment.obj>


More information about the llvm-dev mailing list