This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] elf: Allow dlopen of filter object to work [BZ #16272]
* Szabolcs Nagy:
> the scenario is:
>
> libA.so and libB.so export a set of symbols. this is abi
> and there are multiple providers of libA.so and libB.so.
>
> one provider wants to have a single libinternal.so that
> defines all the symbols of libA and libB as they share a
> lot of code.
>
> (1) having libA.so and libB.so as "wrapper libraries" around
> libinternal.so with RTLD_NEXT would work, but that's less
> efficient because of the extra indirection,
If libA.so and libB.so have libinternal.so as a DT_NEEDED dependency,
you do not need to implement forwarding with RTLD_NEXT.
> (3) symlinking libA.so and libB.so to libinternal.so makes
> all symbols visible when either of them is loaded, polluting
> the link namespace.
Filters do that as well. There is no actual per-symbol run-time
filtering implemented today, and it is unclear if Solaris implements it.
> (libinternal.so is a video driver lib and libA, libB, .. are
> various opengl libs with fixed abi)
Is there an expectation that libinternal interposes symbols in libA
etc., perhaps with more efficient implementations? And if not, a
fallback implementation in libA etc. is used? This is clearly not
supported by the Solaris filter feature (as documented).
Thanks,
Florian