This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld/ld.texinfo: Do not constrain dynamic linker lazy binding behaviour.
On 07/08/2016 08:30 AM, Florian Weimer wrote:
> On 07/08/2016 02:28 PM, Andreas Schwab wrote:
>> Florian Weimer <fweimer@redhat.com> writes:
>>
>>> On 07/08/2016 03:44 AM, Carlos O'Donell wrote:
>>>> @item lazy
>>>> When generating an executable or shared library, mark it to tell the
>>>> -dynamic linker to defer function call resolution to the point when
>>>> -the function is called (lazy binding), rather than at load time.
>>>> -Lazy binding is the default.
>>>> +dynamic linker to defer function call resolution to a future time
>>>> +which may be as late as when the function is called (lazy binding),
>>>> +rather than at load time. Resolution functions for GNU indirect
>>>> +functions (STT_GNU_IFUNC) may be called one or more times during
>>>> +function call resolution. Lazy binding is the default.
>>>
>>> This implies that IFUNC resolver invocations are delayed as late as
>>> possible (right until a function call which needs the relocation). Is
>>> this something we want to guarantee?
>>
>> The text says "may", so I don't see any guarantee.
>
> The “during function call resolution” part concerns me.
I understand your concern. Here is another slightly altered wording.
v3
- Remove the use of the word "call' to avoid confusion around where
the resolution happens. Use "function reference" instead.
OK with this wording?
2016-07-08 Carlos O'Donell <carlos@redhat.com>
* ld.texinfo (Command Line Options,lazy): Lazy binding can
happen at any time between load and function call.
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index bc16764..4fc84c9 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1122,9 +1122,11 @@ but the primary executable.
@item lazy
When generating an executable or shared library, mark it to tell the
-dynamic linker to defer function call resolution to the point when
-the function is called (lazy binding), rather than at load time.
-Lazy binding is the default.
+dynamic linker to defer the resolution of function references to a
+future time (lazy binding) which may be as late as when the function is
+called, rather than at load time. Resolution functions for GNU indirect
+functions (STT_GNU_IFUNC) may be called one or more times during the
+processing of lazy bindings. Lazy binding is the default.
@item loadfltr
Marks the object that its filters be processed immediately at
---
--
Cheers,
Carlos.