On 09/11/16 21:29, Christophe Lyon wrote:
> Hi,
> 
> PR 78253 shows that the handling of weak references has changed for
> ARM with gcc-5.
> 
> When r220674 was committed, default_binds_local_p_2 gained a new
> parameter (weak_dominate), which, when true, implies that a reference
> to a weak symbol defined locally will be resolved locally, even though
> it could be overridden by a strong definition in another object file.
> 
> With r220674, default_binds_local_p forces weak_dominate=true,
> effectively changing the previous behavior.
> 
> The attached patch introduces default_binds_local_p_4 which is a copy
> of default_binds_local_p_2, but using weak_dominate=false, and updates
> the ARM target to call default_binds_local_p_4 instead of
> default_binds_local_p_2.
> 
> I ran cross-tests on various arm* configurations with no regression,
> and checked that the test attached to the original bugzilla now works
> as expected.
> 
> I am not sure why weak_dominate defaults to true, and I couldn't
> really understand why by reading the threads related to r220674 and
> following updates to default_binds_local_p_* which all deal with other
> corner cases and do not discuss the weak_dominate parameter.
> 
> Or should this patch be made more generic?
> 

I certainly don't think it should be ARM specific.

The questions I have are:

1) What do other targets do today.  Are they the same, or different?
2) If different why?
3) Is the current behaviour really what was intended by the patch?  ie.
Was the old behaviour actually wrong?

R.
> Thanks,
> 
> Christophe
> 

Reply via email to