[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specify how undefined weak symbol should be resolved in executable



On Tue, Feb 23, 2016 at 05:18:16PM -0800, H.J. Lu wrote:
> On Tue, Feb 23, 2016 at 5:04 PM, Alan Modra <amodra@gmail.com> wrote:
> > On Tue, Feb 23, 2016 at 09:10:51AM -0800, H.J. Lu wrote:
> >> At run-time, there is no difference between weak defined and non-weak
> >> defined symbols.
> >
> > This is not true, and even if it was..
> >
> 
> Please do
> 
> # git grep dl_dynamic_weak
> 
> in glibc to see it for yourself.

That's exactly the code that shows ld.so can treat weak and strong
symbols differently!  (And yes, I know the default setting of
dl_dynamic_weak.)

Besides, the main point of my comment was that it is simply faulty
reasoning to claim that the linker needs to change because of some
ld.so behaviour.

-- 
Alan Modra
Australia Development Lab, IBM