> On Tue, May 14, 2013 at 11:12 AM, Jan Hubicka <hubi...@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