[PATCH v3] nptl: Export libthread_db-used symbols under GLIBC_PRIVATE

Florian Weimer fweimer@redhat.com
Tue Jun 29 09:09:21 GMT 2021


* Szabolcs Nagy:

> The 06/28/2021 08:59, Carlos O'Donell via Libc-alpha wrote:
>> On 6/28/21 8:41 AM, Florian Weimer wrote:
>> > This allows distributions to strip debugging information from
>> > libc.so.6 without impacting the debugging experience.
>> 
>> This looks good, no redundant checks. The only *MAIN* symbol
>> left in structs.def is from ld.so and we skip checking it
>> (because the test framework only processes libc.so's symbols).
>> 
>> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
>
> after the previous two nptl_db commits i see
>
> FAIL: nptl_db/db-symbols
>
> i thought this third patch would fix it, but it didn't:
>
> $ head nptl_db/db-symbols.out
> _thread_db_pthread_eventbuf_eventmask_event_bits@@GLIBC_PRIVATE ***MISSING***
> _thread_db_pthread_start_routine@@GLIBC_PRIVATE ***MISSING***
> _thread_db_sizeof_list_t@@GLIBC_PRIVATE ***MISSING***
> _thread_db_pthread_schedparam_sched_priority@@GLIBC_PRIVATE ***MISSING***
> _thread_db_td_eventbuf_t_eventdata@@GLIBC_PRIVATE ***MISSING***
> _thread_db_list_t_prev@@GLIBC_PRIVATE ***MISSING***
> _thread_db_sizeof_dtv_slotinfo@@GLIBC_PRIVATE ***MISSING***
> _thread_db_pthread_cancelhandling@@GLIBC_PRIVATE ***MISSING***
> _thread_db___pthread_keys@@GLIBC_PRIVATE ***MISSING***
> _thread_db_rtld_global__dl_tls_dtv_slotinfo_list@@GLIBC_PRIVATE ***MISSING***
>
> is this expected?

It is not expected.  The test runs even when cross-compiling, and I
don't see this failure in a default build-many-glibcs.py run.

Are these symbols present as dynamic symbols in your build of libc.so.6?

I suspect your readelf has different output not expected by the script.
Apparently older versions do not print symbol versioning information
with -D -s. 8-( I guess we should parse ELF directly, rather than
readelf output, because it is easier to maintain.

As a stop-gap measure, we should probably switch to objdump -T.

Thanks,
Florian



More information about the Libc-alpha mailing list