Put more stuff in the comdat used for variables with static init

Reid Kleckner rnk at google.com
Fri Sep 19 09:57:43 PDT 2014


I think we want this comdat grouping on mingw. Unlike C5/D5, the global
variable is a real symbol that is a member of the comdat group. I think the
check should still be !MachO, but the code that sets the comdat of the
global and the initializer function needs to be sunk into the
ItaniumCXXABI.cpp code.

On Thu, Sep 18, 2014 at 7:13 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 18 September 2014 21:52, Reid Kleckner <rnk at google.com> wrote:
> > The global_ctors patch seems fine, but I think David approved the
> previous
> > patch prematurely.
> >
> > The initializer code on Windows is already in its own comdat while the
> > global_ctors entry is in the comdat with the global. We should leave
> that as
> > is.
> >
> > I also think you need to put the the global (the key) into a proper
> comdat,
> > and not just leave it as a linkonce_odr global.
>
> Something like this?
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140919/5ecf2d51/attachment.html>


More information about the cfe-commits mailing list