[patch] Fix a few related COFF comdat issues

Reid Kleckner rnk at google.com
Fri Jun 6 12:07:03 PDT 2014


Thanks, this is great!  lgtm

@@ -54,12 +49,9 @@ class MCSymbol;
                   const MCSectionCOFF *Assoc, SectionKind K)

Do we need the Assoc parameter still?

         : MCSection(SV_COFF, K), SectionName(Section),
           Characteristics(Characteristics), COMDATSymbol(COMDATSymbol),
-          Selection(Selection), Assoc(Assoc) {
+          Selection(Selection) {



On Fri, Jun 6, 2014 at 11:42 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> These issues are easier to fix in a single patch:
>
> * Section association cannot use just the section name as many
> sections can have the same name. With this patch, the comdat symbol in
> an assoc section is interpreted to mean a symbol in the associated
> section an the mapping is discovered from it.
>
> * Comdat symbols were not being set correctly. Instead we were getting
> whatever was output first for that section.
>
> A consequence is that associative sections now must use .section to
> set the association. Using .linkonce would not work since it is not
> possible to change a sections comdat symbol (it is used to decide if
> we should create a new section or reuse an existing one).
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140606/8022ad84/attachment.html>


More information about the llvm-commits mailing list