This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [arm] branches to weak symbols
- From: Alan Modra <amodra at gmail dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: binutils <binutils at sources dot redhat dot com>, Paul Brook <paul at codesourcery dot com>
- Date: Thu, 29 Apr 2010 09:03:45 +0930
- Subject: Re: [arm] branches to weak symbols
- References: <4BD7F68D.9070102@codesourcery.com>
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