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.


"H . J . Lu" <hjl@lucon.org> writes:

> But the C++ testcase works fine on your Solaris? 

For me, this is only hearsay so far, I have not verified this
myself. I believe Jason Merrill has, and came to the conclusion that
even though ld.so appears to work the same, that RTTI matching still
behaves different, without further investigating why.

I'll see whether I can get further details.

> Anyway, we have a strange situation here:

I agree.


> 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.

I think it should: As David Abrahams suggests, the dynamic linker
should resolve all references for foo to the definiton in B (thus
ignoring the definition in C, just as it would with RTLD_GLOBAL).

Regards,
Martin


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