[PATCH v2 4/6] nptl: Only issues __libc_unwind_link_get for SHARED

Collin Funk collin.funk1@gmail.com
Thu Feb 26 01:34:31 GMT 2026


Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:

> The compiler already optimizes it away for static builds.
> ---
>  nptl/pthread_exit.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/nptl/pthread_exit.c b/nptl/pthread_exit.c
> index 4d320e608f..4c15171992 100644
> --- a/nptl/pthread_exit.c
> +++ b/nptl/pthread_exit.c
> @@ -24,12 +24,14 @@
>  void
>  __pthread_exit (void *value)
>  {
> +#ifdef SHARED
>    {
>      struct unwind_link *unwind_link = __libc_unwind_link_get ();
>      if (unwind_link == NULL)
>        __libc_fatal (LIBGCC_S_SO
>                      " must be installed for pthread_exit to work\n");
>    }
> +#endif
>  
>    __do_cancel (value);
>  }

I reviewed the previous version, so this one again is fine with me:

Reviewed-by: Collin Funk <collin.funk1@gmail.com>

I don't think I have the prerequisite knowledge needed for the other
patches, otherwise I would have reviewed them as well. :)

Collin


More information about the Libc-alpha mailing list