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: [arm] branches to weak symbols


On Wed, Apr 28, 2010 at 09:49:17AM +0100, Nathan Sidwell wrote:
> *** write.c	23 Jan 2010 12:05:32 -0000	1.129
> --- write.c	28 Apr 2010 08:40:28 -0000
> *************** fixup_segment (fixS *fixP, segT this_seg
> *** 992,998 ****
>   
>         if (fixP->fx_addsy)
>   	{
> ! 	  if (add_symbol_segment == this_segment
>   	      && !TC_FORCE_RELOCATION_LOCAL (fixP))
>   	    {
>   	      /* This fixup was made when the symbol's segment was
> --- 992,1000 ----
>   
>         if (fixP->fx_addsy)
>   	{
> ! 	  if (S_IS_WEAK (fixP->fx_addsy))
> ! 	    ; // even if it is defined, it might be overridden later
> ! 	  else if (add_symbol_segment == this_segment
>   	      && !TC_FORCE_RELOCATION_LOCAL (fixP))
>   	    {
>   	      /* This fixup was made when the symbol's segment was

I don't believe this is correct.  The default TC_FORCE_RELOCATION*
macros should avoid applying relocations against weak symbols.  See
generic_force_reloc and S_FORCE_RELOC.

-- 
Alan Modra
Australia Development Lab, IBM


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