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]
Other format: [Raw text]

Re: SH: forced local symbols


On Fri, Aug 23, 2002 at 12:03:11PM +0930, Alan Modra wrote:
> On Thu, Aug 22, 2002 at 03:24:16PM -0400, Daniel Jacobowitz wrote:
> > That patch wasn't quite right; I checked created_dynamic_sections
> > before it was necessarily set.  Here's an update; this should probably
> > be taken together with Stephen's zalloc patch, since it now could
> > potentially allocate more relocation slots than necessary.
> 
> s/could potentially/will, with the right input,/  You need to delay
> allocation similarly to elf32-i386.c, elf32-hppa.c etc. to stop
> R_NONE relocs.

Right.  A matter for another time.  I'd rather hold off on SH backend
changes until we can get Kaz Kojima's refcounting work in; which
will be a little time.

> > @@ -5091,7 +5104,12 @@ sh_elf_check_relocs (abfd, info, sec, re
> >  		    return false;
> >  		}
> >  
> > -	      srelgot->_raw_size += sizeof (Elf32_External_Rela);
> > +	      /* If the symbol is still dynamic allocate space for the
> > +		 relocation.  We have to use true instead of the correct
> > +		 dynamic_sections_created, because we don't know if they've
> > +		 been created yet.  */
> > +	      if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (true, info, h))
> > +		srelgot->_raw_size += sizeof (Elf32_External_Rela);
> 
> Shouldn't you just be using "if (info->shared)" here?

No... if we aren't going to call _finish_dynamic_symbol, we won't be
needing the GOT entry (I think) and we certainly do need to do the
allocation at this stage in applications with a GOT.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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