This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: linuxconf complexity
Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:
>
> I've changed Uli's programs according to Jack's description (hopefully
> - please verify!) and now it seems that the program does what Jack
> want it to do;-):
>
Hmmm... OK, so M dynloads N with RTLD_GLOBAL, N requires O; N calls a
function in O, which dynloads P; P isn't linked against O but tries to
directly call a function in O. This fails.
IMHO, it's perfectly correct to do so. Loading libN.so with RTLD_GLOBAL
should load the symbols in libN.so into the global table, but NOT any of
the libraries libO.so happens to be dynamically linked with, no matter
whether N or O ends up actually dynloading P.
I don't think it's unreasonable to require P to be linked with -lO if
it calls any functions in O. This is what ld.so requires in all other
situations. Playing with visibility (i.e. if the code which loads P happens
to be within library O, then *poof* the symbols in O are visible to P) is a
bad idea.
--
Matthias Urlichs | noris network GmbH | smurf@noris.de | ICQ: 20193661
The quote was selected randomly. Really. | http://www.noris.de/~smurf/
--
Real programmers don't comment their code. If it was hard to write, it
should be hard to understand.