svn commit: branches/uClibc-nptl: ldso/include ldso/ldso libc/misc/pthread etc...
Peter S. Mazinger
ps.m at gmx.net
Sun Jan 15 08:53:51 UTC 2006
On Sat, 14 Jan 2006 sjhill at uclibc.org wrote:
> Author: sjhill
> Date: 2006-01-14 11:32:10 -0800 (Sat, 14 Jan 2006)
> New Revision: 13320
>
> Log:
> Get rid of more glibc NPTL symbol and alias madness. Also disable usage of
> 'libc/sysdeps/linux/common/fork.c' when NPTL is being used. Finally, there
> are additional weak functions that need to be defined when using NPTL which
> have also been added.
some comments about new behaviour:
__x are generally gone
you generally define x and if you need a version that is intended to be
used internally within a specific lib, then you do
libx_hidden_proto(x) before defining x
and libx_hidden_def(x) after defining x
__mem*, __str* are as well gone, if they are needed within libc, define
libc_hidden_proto(mem*/str*) after the includes of headers (but before the
first use of mem*/str*) for libpthread you have to use the externally
visible mem*/str*
#ifdef IS_IN_libc
__memset
#else
memset
#endif
won't work, add libc_hidden_proto(memset), this will do
#ifdef IS_IN_libc
__GI_memset
#else
memset
#endif
rtld_hidden_proto/def(x) should be used if you intend to make hidden
versions of x, that can be used internally within ldso
you seem to miss the meaning of hidden_def(x), that (despite of its name)
does not create any hidden x, it does an equivalent
of strong_alias(x,__GI_x), the hiding is done by hidden_proto(x)
I would suggest using *_hidden_def/proto instead of hidden_def/proto
(important if the file is compiled for more than one lib, but only one has
hidden versions), hidden_def/proto will make them hidden all the time.
removing rtld_hidden_proto/def and replacing with only hidden_def results
in creating an internal __GI_x, but leaving it visible, by removing
rtld_hidden_proto(x) noone will ever use the internal version
for asm the *_hidden_proto does not make sense, so it should be used like
.global vfork
...
vfork:
blah
libc_hidden_def(vfork)
equivalent to: hidden_strong_alias(vfork)
being: .global __GI_vfork;.hidden __GI_vfork; strong_alias(vfork,__GI_vfork)
if you have to call the internal version within asm, do
HIDDEN_JUMPTARGET(vfork)
see also newly added libc_pthread_init.c/forward.c to linuxthreads.old
I have converted almost all weak_alias to strong_alias.
My idea is to mark with weak_alias only those that really are needed to be
overwritten by any other (stronger) from another lib. Could you please
provide the list of functions that nptl needs weak within libc?
Jocke: will this be handled correctly by ldso, or it will load the first
found version (e.g the one in libc, despite the weak) ?
Thanks, Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
More information about the uClibc
mailing list