[patch] Correctly set the comdat symbol on COFF

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jun 5 12:20:43 PDT 2014


We extended the .section syntax to allow multiple sections with the
same name but different comdats, but currently we don't make sure that
the output section has that comdat symbol.

That happens to work with the code llc produces currently because it looks like

.section secName, "dr", one_only, "COMDATSym"
.globl COMDATSym
COMDATSym:
....

but that is not very friendly to anyone coding in assembly or even to
llc once we get comdat support in the IR.

The attached patch changes the coff object writer to make sure the
comdat symbol is output just after the section symbol, as required by
the coff spec.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: text/x-patch
Size: 5620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140605/d32b0941/attachment.bin>


More information about the llvm-commits mailing list