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

Re: RFC: ABI support for special memory area



On Thu, Mar 16, 2017 at 1:40 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 03/15/2017 11:03 PM, H.J. Lu wrote:
>>
>> After all shared objects and the executable file are loaded, relocations
>> are processed, for each GNU_MBIND segment in a shared object or the
>> executable file, run-time loader calls __gnu_mbind_setup with type,
>> address and length.  The default implementation of __gnu_mbind_setup is
>
>
> Is there a specified invocation order for the segments?
>
> Does the call happen immediately after relocations for an object are
> processed, or only after relocations for all objections are processed?
>
> If the latter, why can't you use the existing ELF constructor mechanism for
> this?  As far as I understand it, the call to __gnu_mbind_setup would just
> happen before the constructor calls.

That is correct.  The issue is to access the ELF segment header for each
loaded object only once.  There is no good way to get this info from
constructor.

-- 
H.J.