[git commit master] nptl: mark symbols with libc forwarder hidden

Carmelo AMOROSO carmelo.amoroso at st.com
Mon Sep 20 10:46:41 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/23/2010 4:31 PM, Timo Teräs wrote:
> 
> commit: http://git.uclibc.org/uClibc/commit/?id=1610762362e651f86ca284ac59a1d7ec88034e4e
> branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
> 
> Add attribute_hidden to all symbols having libc forwarder. This prevents
> recursive self calls which would happen if libc is before libpthread in
> linking order: the forwarder functions would call itself via the function
> table, since the libpthread symbols would get overwritten with libc ones.
> This has not been a problem in glibc since there these symbols are marked
> hidden with linker version-script. Since we don't use one, we need to mark
> these explicitly.
> 
> Signed-off-by: Timo Teräs <timo.teras at iki.fi>
> Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
> ---
>  libpthread/nptl/cleanup_defer_compat.c             |    2 ++
>  libpthread/nptl/init.c                             |    4 ++--

> diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
> index b651a3e..87c08fa 100644
> --- a/libpthread/nptl/init.c
> +++ b/libpthread/nptl/init.c
> @@ -111,8 +111,8 @@ static const struct pthread_functions pthread_functions =
>      .ptr___pthread_key_create = __pthread_key_create_internal,
>      .ptr___pthread_getspecific = __pthread_getspecific_internal,
>      .ptr___pthread_setspecific = __pthread_setspecific_internal,
> -    .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
> -    .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
> +    .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer,
> +    .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore,
>      .ptr_nthreads = &__nptl_nthreads,
>      .ptr___pthread_unwind = &__pthread_unwind,
>      .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,

Hi Timo,
sorry for coming to this back with a so long delay, but we have recently
updated our uClibc branch against master, and we have found some
problems to boot with Upstart due to this change.

I've seen that a following commit has reverted most of the changes done
by this patch, but the init.c has not been reverted.

Indeed, it's not so clear to me the reason for the change above; could
you explain better ?

Anyway I can say that with this change in place, Upstart cannot work
properly: we got a segfault and I guess it's due to a stack overflow.

Changing it back to the original version, allowed us to boot successfully.

What is your opinion ?

Thanks,
Carmelo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyXO5EACgkQoRq/3BrK1s9SJwCglWVmbFvki7FgcHIpx1PIKYCs
GugAn2qz7vJcQ1yy1F8M1Xo4tW6tkyxd
=4AVG
-----END PGP SIGNATURE-----


More information about the uClibc-cvs mailing list