This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix weakrefs and LTO


> On Tue, May 14, 2013 at 11:12 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > this patch fixes with weakrefs seen on building latest firefox.  The problem is
> > that currently we handle weakrefs as external variables/functions that makes us
> > to merge them.  In firefox there are two weakrefs with different aliases used
> > in different units.  This is correct and well defined even if weird use.
> >
> > This patch adds special cases for weakrefs into lto-symtab and lto-partition
> > to make them go through correctly.  I also fixed two fallouts of my previous
> > change that reproduce on firefox (and the testcase addded).
> >
> > For lto-partition the weakrefs with defined target are even bit more special
> > animals, since they needs to be duplicated into every unit that use them.
> >
> > It is ugly to special case wekarefs all around.  My plan is to cleanup whole
> > area, but it seems that the correctness issue deserve to be fixed first.
> >
> > I have bootstrapped/regtested x86_64-linux and tested mozilla build.  Will
> > commit it tonight if there are no complains.
> 
> Does this affect the 4.8 branch, too?

Yes,t he bug exists on release branches, too.
The patch will need a rework though, since 4.9 has new code for static var renaming.
I will check how hard it is fix with the old code.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]