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: [committed] MIPS/BFD: Remove extraneous undefined weak symbol visibility check


On Fri, Jun 29, 2018 at 03:48:08PM +0100, Maciej W. Rozycki wrote:
>  I got to this finally, in the course of resolving PR ld/21805.  The MIPS 
> backend currently ignores `-z dynamic-undefined-weak' and its complement, 
> however this can change once PR ld/21805 has been fixed.  But what is the 
> intended interaction between this option and `--export-dynamic' (and its 
> complement)?  Should one override the other or ignore it?
> 
>  But only exporting undefined weaks makes no sense to me.  So I'm tempted 
> to make the MIPS backend only export undefined weaks if `--export-dynamic' 
> and `-z dynamic-undefined-weak' are active both at once, even though it 
> looks to me like with all the other backends the options ignore each 
> other.

-z dynamic-undefined-weak should make undefined weak symbol behave
just like strong undefined symbols, which are made dynamic independent
of --export-dynamic.  --export-dynamic affects defined symbols.

>  Also I still do not understand the matter of PR ld/22269, that is why 
> exporting undefined weaks in PIE (static or dynamic) would cause a 
> non-zero run-time value?  They'll still be undefined weaks at load time 
> after all (unless, in the dynamic case, satisfied by a DSO), so the 
> original value of zero is supposed to stay, and if it is not the case, 
> then it looks to me like a run-time loader bug rather than a static linker 
> one.

Yes, dynamic undefined weaks should remain zero if no definition is
found at run time.  -z nodynamic-undefined-weak is supposed to ensure
they remain zero when no definition was found at link time even if a
definition is found at run time.

-- 
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]