This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PATCH: Treat RTLD_LOCAL like Solaris (Re: Duplicate data objects in shared libraries)
- From: "H . J . Lu" <hjl at lucon dot org>
- To: David Abrahams <david dot abrahams at rcn dot com>
- Cc: Jason Merrill <jason at redhat dot com>,"Martin v. Loewis" <martin at v dot loewis dot de>, drepper at redhat dot com,"Ralf W. Grosse-Kunstleve" <rwgk at cci dot lbl dot gov>,GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Wed, 29 May 2002 15:11:23 -0700
- Subject: Re: PATCH: Treat RTLD_LOCAL like Solaris (Re: Duplicate data objects in shared libraries)
- References: <76260000.1021912729@warlock.codesourcery.com> <wvlhel2ocz3.fsf@prospero.cambridge.redhat.com> <60630000.1021922077@gandalf.codesourcery.com> <00ba01c20035$805388a0$6601a8c0@boostconsulting.com> <wvln0uumvqt.fsf@prospero.cambridge.redhat.com> <08b101c201f0$d511fd60$6601a8c0@boostconsulting.com> <wvloff7ea9a.fsf@prospero.cambridge.redhat.com> <20020529130945.A16909@lucon.org> <039401c20759$a3ba1400$6601a8c0@boostconsulting.com>
On Wed, May 29, 2002 at 05:41:45PM -0400, David Abrahams wrote:
> From: "H . J . Lu" <hjl@lucon.org>
>
>
> > This patch makes glibc more like Solaris for RTLD_LOCAL. It also passed
> > "make check" in glibc. Any comments?
>
> It's not clear to me that working "more like Solaris" was what we were
> after, and since I don't know the loader code I can't evaluate the patch
> very well. Would you mind describing the semantic differences caused by
> your patch, and if possible, how they play out in C++?
>
Say we have
1. A.so has DT_NEEDED for C.so.
2. B.so has DT_NEEDED for C.so.
Before my change, when you dlopen A.so/B.so, A.so/B.so will always be
searched first befoe C.so to resolve any symbol references within
A.so/B.so, even if C.so has been loaded via dlopen before A.so/B.so,
unless C.so is in the global scope. The result is the same symbol may
have different bindings within the address space of A.so or B.so. That
is the cause of the problem. With my change, we search C.so first if
it has been loaded via dlopen before.
H.J.