r218141 - In the Itanium ABI, move stuff to the comdat of variables with static init.

Reid Kleckner rnk at google.com
Wed Oct 8 09:51:21 PDT 2014


On Tue, Oct 7, 2014 at 7:03 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> >
> >          .file 1 "test.c"
> >
> >          .section        .text.startup,"axG", at progbits,test,comdat
> >          .loc 1 1
> >          nop
> >
> >          .section        .text.startup,"ax", at progbits
> >          .loc 1 1
> >          nop
> >
> > This will cause multiple sections named ".text.startup" to exist in the
> > output object, one within the comdat group and one outside of it.   This
> in
> > turn triggers a bug in dwarf2dbg.c in GAS, where it gets confused in
> > looking up the section name in a hash table and assumes there can only be
> > one section with the same name, resulting in an internal error.
>
> Were we already causing GAS problems in r217264? It would cause us to
> create multiple .init_array sections. Or is the problem specific to
> .text.startup?
>
> > This causes compile failures in the tramp3d-v4 and CoyoteBench/fftbench
> > test cases in test-suite when using -g to build the suite.
> >
> >
> > The bug is fixed in mainline GAS here:
> > https://sourceware.org/ml/binutils/2014-09/msg00211.html
> > but that hasn't made it into any release (or distro) yet.
>
> Sigh :-(
>
> So, this is only when not using the integrated assembler and using -g?
> I am tempted to just live with this bug and make sure the integrated
> assembler works. Why wasn't the integrated assembler used? Were you
> explicitly testing the external one?
>

In the past we have attempted to ensure that our code sections have unique
names by appending the function name, like .text._Z1fEv. We could do the
same in clang if we wanted to workaround this bug. Personally, I vote we
live with this bug in gas and use the integrated assembler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141008/2e5f3eb7/attachment.html>


More information about the cfe-commits mailing list