RFC: Treat RTLD_GLOBAL as unique to namespace when used with dlmopen
Carlos O'Donell
carlos@redhat.com
Fri Sep 18 04:22:00 GMT 2015
On 09/15/2015 02:39 PM, Carlos O'Donell wrote:
> On 07/24/2015 02:37 PM, Carlos O'Donell wrote:
>> With a few more patches I get *almost* all the way there:
>
> [carlos@athas dlmopen_expt]$ ./main
> main(): lmid from dlopen(NULL) is 0 (handle = 0x0x7feda4b49168)
> main(): dlmopen LM_ID_NEWLM ./libabc.so RTLD_GLOBAL
> main(): lmid from dlopen("libabc.so") is 1 (handle = 0x0x1cc7440)
> main(): invoking abc_start()
> Called abc_start()
> abc_start(): lmid from dlopen(NULL) is 1 (handle = 0x0x1cc7440)
> abc_start(): dlmopen LM_ID_BASE ./libdef.so RTLD_GLOBAL
> abc_start(): dlopen ./libjkl.so RTLD_GLOBAL
> abc_start(): dlopen ./libmno.so RTLD_LOCAL
> abc_start(): dlopen ./libqrs.so RTLD_LOCAL
> abc_start(): invoking qrs_start()
> Called qrs_start()
> qrs_start(): lmid from dlopen(NULL) is 1 (handle = 0x0x1cc7440)
> qrs_start(): lookup of "abc" succeeded
> qrs_start(): lookup of "def" failed
> qrs_start(): lookup of "jkl" succeeded
> qrs_start(): lookup of "mno" failed
> qrs_start(): lookup of "main" failed
> main(): lookup of "abc" failed
> main(): lookup of "def" succeeded
> main(): lookup of "jkl" failed
> main(): lookup of "mno" failed
> [carlos@athas dlmopen_expt]$ echo $?
> 0
>
> I'm now passing your test.
All patches on carlos/dlmopen branch, tracking master.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list