[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 6:04 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> On 02/23/2016 08:56 PM, Alan Modra wrote:
>> 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.
>
> Agreed. Anything that brings back weak symbols into the dynamic loader
> is going to be highly suspect to me, and require a lot of explaining.
>

I was saying as far as ld was concerned, weak defined and non-weak
defined dynamic symbols would be treated equally at run-time.  Do you
agree with me?


-- 
H.J.