http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49533
--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-06-27 10:25:13 UTC --- (In reply to comment #1) > The patch you quote has the effect of disabling pure const discovery for > functions calling functions with an aliases defined. It is quite surprising > that this does make a difference, but I still think this is most likely effect > of PR47247. > > The COMDAT problem causes inline functions with address taken to not be > optimized when their address is taken and indirect call profiling takes > address > of all virtuals. > > Carry made an gold update that will hopefully hit the CVS binutils soonish and > I will update then the GCC side. Until that happens, I would advice using > -fprofile-generate -fno-lto (i.e. LTO is not needed for the instrumented > compiler). Note that this happens with "-fprofile-generate" only (no lto involved). Sprinkling "__attribute__((used))" all over the Javascript code, or using ld.bfd solves the first issue, too.