[RFC 4/5] elf: Enable RTLD_NODELETE on __libc_unwind_link_get

Florian Weimer fweimer@redhat.com
Wed Jun 12 09:54:46 GMT 2024


* Adhemerval Zanella:

> The libgcc_s.so can also be sealed.  The library is loaded once
> and not unloaded during process execution (only for memory debug
> with __libc_unwind_link_freeres).

The unwind-link change to use RTLD_NODELETE could go in separately.

> diff --git a/misc/unwind-link.c b/misc/unwind-link.c
> index 213a0162a4..7267ecbec3 100644
> --- a/misc/unwind-link.c
> +++ b/misc/unwind-link.c

> @@ -100,7 +100,8 @@ __libc_unwind_link_get (void)
>  
>    __libc_lock_lock (lock);
>    if (atomic_load_relaxed (&global_libgcc_handle) != NULL)
> -    /* This thread lost the race.  Clean up.  */
> +    /* This thread lost the race.  Drop the l_direct_opencount and issue
> +       the debug log.  */
>      __libc_dlclose (local_libgcc_handle);
>    else
>      {

I don't understand what “debug log” means in this context.

Thanks,
Florian



More information about the Libc-alpha mailing list