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: Please try this testcase on Solaris.


On Sun, May 19, 2002 at 08:59:31PM +0200, Martin v. Loewis wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > Could someone please send me the output on Solaris?
> 
> On Solaris, I get
> 
> ./main global lazy
> dlopen flags: RTLD_GLOBAL | RTLD_LAZY:
> module1.so: 1
> module2.so: 1
> ./main global now
> dlopen flags: RTLD_GLOBAL | RTLD_NOW:
> module1.so: 1
> module2.so: 1
> ./main local lazy
> dlopen flags: RTLD_LOCAL | RTLD_LAZY:
> module1.so: 1
> module2.so: 0
> ./main local now
> dlopen flags: RTLD_LOCAL | RTLD_NOW:
> module1.so: 1
> module2.so: 0
> 
> So it looks identical.

But the C++ testcase works fine on your Solaris? I am very curious
about how it works on Solaris. Anyway, we have a strange situation
here:

1. A has undefined symbol, foo, and B's behavior depends on the
definition of foo.
2. B has DT_NEEDED for A and has a difinition of foo.
3. C has DT_NEEDED for A and has a difinition of foo.

When both B and C are dlopened with RTLD_LOCAL, A may not work right
if the same A in memory is used for both B and C since foo in B may be
different from foo in A. I can come up with other testcases to show it.
I don't know if/how the dynamic linker should handle it.


H.J.


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