This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add RTLD_RELOAD to dlopen
On 08/03/2017 01:26 PM, Florian Weimer wrote:
> On 08/03/2017 04:37 PM, Samuel Thibault wrote:
>> Hello,
>>
>> So, is it OK to add this? Considering that dlmopen() brings us far from
>> enough factorization for our needs, and dlopen() currently never reloads
>> unless a real fat copy of the file is done (hardlinks/symlinks don't
>> work, as it is based on st_ino).
>
> I would still see a discussion of the intended symbol binding behavior.
>
> What happens if a subsequently loaded object references a duplicated
> library? Will it reference the most recent duplicate, or the original
> library?
>
> What happens if libA depends on libB, and you need to duplicate both?
>
> What happens with RTLD_NEXT in a duplicated object? Will it look at
> earlier duplicates, too?
>
> What happens if you reload libc.so? Your test case assumes that
> reloading works for libm.so, but I think even that is a bit of a stretch.
Agreed. If we add RTLD_RELOAD the semantics must be clearly documented.
We have enough problems with the existing interfaces that I would like
to see this documented better if you're adding a new constant.
On top of this you need tests for the various semantically different
claims we make to show they still work.
And it is *not* OK to go in as-is.
--
Cheers,
Carlos.