This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Treat RTLD_LOCAL like Solaris (Re: Duplicate data objects in shared libraries)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]