<div class="gmail_quote">On Sun, Sep 26, 2010 at 3:28 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com">bigcheesegs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Sun, Sep 26, 2010 at 5:27 PM, Nathan Jeffords<br>
<<a href="mailto:blunted2night@gmail.com">blunted2night@gmail.com</a>> wrote:<br>
> Hi guys,<br>
> While trying to get dwarf debugging information to work with Win32 COFF<br>
> targets, I came across a couple of issues with the current implementation<br>
> of WinCOFFObjectWriter. Emitting empty section causes debug information to<br>
> invalid, as the presence of certain debug section implies available<br>
> information, and emission of labels as symbols confused gdb about the<br>
> structure of the program.<br>
> The attached patch allows the WinCOFFObjectWriter to drop empty sections,<br>
> and label symbols. It converts relocations targeted at symbols into<br>
> relocations relative to the containing section.<br>
> I have not run the tests in the '/test/MC/COFF', but have run through the<br>
> unit-test framework for my compiler and generated some text executables with<br>
> clang and everything looks to be in order. It may change the output of<br>
> the '/test/MC/COFF' if the string references are emitted as temporaries.<br>
> -Nathan<br>
<br>
</div></div>The patch looks good, but please follow the LLVM coding conventions.<br>
Also, clang emits warnings on all of the signed-unsigned comparisons,<br>
and the order of initialization for COFFSymbol::MCData.<br>
<br>
The test fails, but that's only because it is looking for binary<br>
equivalence, just llc the test and run coff-dump to re update it. I<br>
ran the test-suite with clang -integrated-as with and without your<br>
patch and I got identical results.<br>
<br>
So fix the coding conventions, warnings, and update the tests and it's<br>
good. I don't mind doing this if you would prefer.<br>
<font color="#888888"><br>
- Michael Spencer<br>
</font></blockquote></div><br><div>If you don't mind then please make the appropriate changes. Thanks.</div><div><br></div><div>-Nathan</div><div><br></div><div><br></div><div><br></div>