Question regarding __clock_gettime symbol visibility across glibc build

Florian Weimer fw@deneb.enyo.de
Tue Mar 17 08:34:23 GMT 2020


* Lukasz Majewski:

> However, I've checked how it looks on the installed glibc:
> root@y2038arm:/opt# nm /opt/lib/libc.so.6 | grep clock_gettime
>
> 000702bc t __GI___clock_gettime
> 00070264 t __GI___clock_gettime64
> 000702bc T __clock_gettime
> 00070264 T __clock_gettime64
> 000702bc t __clock_gettime_2
> 000702bc T clock_gettime@@GLIBC_2.17
> 000702bc T clock_gettime@GLIBC_2.4
>
> In the installed glibc the __clock_gettime64 is an external symbol.

All exported glibc symbols are versioned.  Chances are that nm does
not look at the dynamic symbol table at all, so its output is
misleading.  I usually use eu-readelf --symbols=.dynsym instead.


More information about the Libc-help mailing list