This is the mail archive of the binutils@sources.redhat.com 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]

Re: Linking libstdc++ with gcc-3.0.2 prerelease fails on IA64


On Tue, Oct 16, 2001 at 11:46:18AM +0930, Alan Modra wrote:
> On Mon, Oct 15, 2001 at 06:23:12PM -0700, H . J . Lu wrote:
> > 
> > 	* elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
> > 	for relocations against discarded link-once section.
> > 
> > --- elflink.h.weak	Mon Oct 15 16:51:51 2001
> > +++ elflink.h	Mon Oct 15 17:02:03 2001
> > @@ -6327,8 +6327,10 @@ elf_link_input_bfd (finfo, input_bfd)
> >  			    && (sec->flags & SEC_LINK_ONCE) != 0
> >  			    && bfd_is_abs_section (sec->output_section))
> >  			  {
> > -			    long r_type = ELF_R_TYPE (rel->r_info);
> > -			    rel->r_info = ELF_R_INFO (0, r_type);
> > +			    reloc_howto_type *howto
> > +			      =  bfd_reloc_type_lookup (output_bfd,
> > +							BFD_RELOC_NONE);
> > +			    rel->r_info = ELF_R_INFO (0, howto->type);
> >  
> >  #if BFD_VERSION_DATE > 20021005
> >  			    (*finfo->info->callbacks->warning)
> 
> Hmm, I wondered whether I was doing the right thing leaving the relocation
> type as it was.  Why not just do
> 
> rel->r_info = 0;
> 
> After all, we rely on R_*_NONE being zero in other places.  In fact, it's
> probably safest to zero the entire reloc, like this:
> 

I believe we should look up BFD_RELOC_NONE and set r_info only with
ELF_R_INFO. But I don't have a strong opinion on that. I only want to
stabilize the linker.


H.J.


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