This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix weakrefs and LTO
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 14 May 2013 19:14:27 +0200
- Subject: Re: Fix weakrefs and LTO
- References: <20130514091211 dot GA26483 at kam dot mff dot cuni dot cz> <CAFiYyc3cMoxOuwLj97X+kdAwQw-yxupuxFNx-8c+bQ5SKnvFJw at mail dot gmail dot com>
> 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