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

Re: RFC: ABI support for special memory area



On 30-Mar-2017 10:10 PM, H.J. Lu wrote:
>> However, I am just thinking that your earlier approach --
>> __gnu_mbind_setup -- is better when shared libraries with GNU_MBIND
>> segments are dlopen'ed. They dont have to iterate all over again to
>> reach their PHDR. Or what is the recommendation for such dlopen'ed
>> libraries?
> 
> It is true that dl_iterate_phdr is called by every shared object, dlopened or
> not, to locate its own PHDR.

Lets put a one liner on best practices or guideline kind of. You have
already made it clear in the example code. I am just thinking of putting
them in words too.

Lets say something like, each load module is expected to process only
its special memory segments. To mean that shlibs/exe need not do any
book-keeping to avoid multiple executions of the special memory setup
for the same load module.

>> And this dl_iterate_phdr(3) not being part of any standards, may change
>> in a totally incompatible way in the future.
>>
> 
> dl_iterate_phdr isn't in any standard.  But it is in glibc.  Given that my
> proposal is a GNU extension, it isn't a major issue.  Working with
> existing glibc is a big plus.

Awesome. Looks great. Thanks a lot for the new approach.

--
Supra