__libc_internal_tsd_*

Jakub Jelinek jakub@redhat.com
Mon Sep 2 05:06:00 GMT 2002


Hi!

Just wondering whether it wouldn't be better to reduce the number of
__libc_internal_tsd_* variables out there for dynamic libraries (ATM
we have 3 copies, ld.so, libc.so and libpthread.so) and instead
just use one in ld.so (perhaps with rtld_hidden* aliases for ld.so,
so it doesn't need the .got entries).
__pthread_initialize_minimal needs to be called anyway and thus could
fill it in...
This would be IMHO especially good for
prelink, since now __libc_internal_tsd_* are always conflicts (at least
in ld.so, but in threaded programs in libc.so too).

If you don't think this is a good idea, we should at least put
__libc_internal_tsd_address in a separate source from the rest of no-tsd.c
(no-tsda.c?), so that ld.so which doesn't use it at all doesn't export it.
Well, if we do what I suggested above, it would make sense to split it too,
since then __libc_internal_tsd_address can have its home in libc.so and
thus loads from it can go through an hidden alias (which is bypassing
one indirection (.got))...

What do you think?

	Jakub



More information about the Libc-hacker mailing list