This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [gold lto patch] Add plugin support for LDPR_PREVAILING_DEF_IRONLY_EXP


> On 2011.09.27 at 20:48 +0200, Jan Hubicka wrote:
> > > This patch adds LDPT_GET_SYMBOLS_V2 to the gold plugin API, which will
> > > return the new LDPR_PREVAILING_DEF_IRONLY_EXP resolution code for
> > > symbols that are referenced only from IR code, but are exported. For
> > > more details, see GCC PR lto/47247:
> > > 
> > >    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47247
> > > 
> > > Tested on x86_64. OK to commit?
> > > 
> > > -cary
> > > 
> > > PS: Is this the right way to put GCC PR tags in a binutils ChangeLog?
> > > 
> > > PPS: Sorry, Honza, for taking so long. I had the implementation done
> > > at the London conference, but never found the time to update the test
> > > suite.
> > 
> > thanks and I am attaching what should be support on GCC side.  However I run into problem
> > that when bulding i.e. tramp3d:
> > /abuild/jh/trunk-install/bin/g++ -O2 -flto=24 tramp3d-v43.o -fpermissive -fdump-ipa-cgraph -fno-fat-lto-objects  --save-temps -fuse-linker-plugin
> > I get no PREVAILING_DEF_INRONLY relocations.  Since I now output all comdats into
> > symbol table there should be plenty of them.
> 
> Hmm, no problems here: 
> % grep 'PREVAILING_DEF_IRONLY' lm.res | wc -l
> 10278
> There are no PREVAILING_DEF_IRONLY_EXPs however: 
> % grep 'PREVAILING_DEF_IRONLY_EXP' lm.res | wc -l
> 0
> 
> However libxul from Mozilla has plenty of them:
>  % grep 'PREVAILING_DEF_IRONLY_EXP' ccN7qyao.res | wc -l
> 9291
> 

Yep, there are some but not enough...
> > !       if (DECL_COMDAT (node->decl)
> >   	  && cgraph_comdat_can_be_unshared_p (node))
> >   	continue;
> >         if ((node->alias && !node->thunk.alias) || node->global.inlined_to)
> > --- 1352,1358 ----
> >         node = lto_cgraph_encoder_deref (encoder, i);
> >         if (!DECL_EXTERNAL (node->decl))
> >   	continue;
> > !       if (DECL_COMDAT (node->decl) && 0
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> This line causes a link error when I build gold with LTO:

this disables the hack that we can't optimize COMDATs that this patch is trying
to solve.  So there is still some problem.  I will double check that everything
seems fine on GCC side, but I run into same problem with javascript shell that
has no IRONLY_EXP for me and thus it seems like problem on gold side.

Honza


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