This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Treat RTLD_GLOBAL as unique to namespace when used with dlmopen
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 18 Sep 2015 00:22:53 -0400
- Subject: Re: RFC: Treat RTLD_GLOBAL as unique to namespace when used with dlmopen
- Authentication-results: sourceware.org; auth=none
- References: <55A73673 dot 3060104 at redhat dot com> <55AD4474 dot 3070900 at gmail dot com> <55B285E5 dot 6080708 at redhat dot com> <55F865EC dot 1000501 at redhat dot com>
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.