On my desktop (based on Ubuntu Lucid), in /usr/bin, there are 430 executables that link to libpthread.so, but only 4 of them have TLS:
lftp luatex mono Xvfb
Of these, the largest TLS MemSize is in mono:
readelf -l mono | grep -A1 TLS TLS 0x00000000002685b0 0x00000000008685b0 0x00000000008685b0 0x0000000000000000 0x0000000000000048 R 8
a whopping 72 bytes. The other three have 16-byte TLS.
This isn't of course the whole story, as shared libraries to contribute to static tls size as well.
In /lib, the following 4 libraries have TLS segment:
libc-2.11.1.so libcom_err.so.2.1 libmemusage.so libselinux.so.1 libuuid.so.1.3.0
The largest one is in libselinux.so.1 at 160 bytes:
TLS 0x000000000001bd50 0x000000000021bd50 0x000000000021bd50 0x0000000000000000 0x00000000000000a0 R 8
followed by glibc itself, at 104 bytes:
TLS 0x0000000000179738 0x0000000000379738 0x0000000000379738 0x0000000000000010 0x0000000000000068 R 8
In /usr/lib, the following have TLS:
libcap-ng.so.0.0.0 libdw-0.143.so libelf-0.143.so libexempi.so.3.2.1 libgomp.so.1.0.0 libpulsecore-0.9.21.so libstdc++.so.6.0.13
The largest one is libcap-ng.so.0.0.0 at 48 bytes:
TLS 0x0000000000003db4 0x0000000000203db4 0x0000000000203db4 0x0000000000000030 0x0000000000000030 R 4
I rest my case ;-)
On my desktop (based on Ubuntu Lucid), in /usr/bin, there are 430 executables that link to libpthread.so, but only 4 of them have TLS:
lftp
luatex
mono
Xvfb
Of these, the largest TLS MemSize is in mono:
readelf -l mono | grep -A1 TLS
0x0000000000 000000 0x0000000000000048 R 8
TLS 0x00000000002685b0 0x00000000008685b0 0x00000000008685b0
a whopping 72 bytes. The other three have 16-byte TLS.
This isn't of course the whole story, as shared libraries to contribute to static tls size as well.
In /lib, the following 4 libraries have TLS segment:
libc-2.11.1.so
libcom_err.so.2.1
libmemusage.so
libselinux.so.1
libuuid.so.1.3.0
The largest one is in libselinux.so.1 at 160 bytes:
TLS 0x000000000001bd50 0x000000000021bd50 0x000000000021bd50
0x0000000000 000000 0x00000000000000a0 R 8
followed by glibc itself, at 104 bytes:
TLS 0x0000000000179738 0x0000000000379738 0x0000000000379738
0x0000000000 000010 0x0000000000000068 R 8
In /usr/lib, the following have TLS:
libcap-ng.so.0.0.0 0.9.21. so
libdw-0.143.so
libelf-0.143.so
libexempi.so.3.2.1
libgomp.so.1.0.0
libpulsecore-
libstdc++.so.6.0.13
The largest one is libcap-ng.so.0.0.0 at 48 bytes:
TLS 0x0000000000003db4 0x0000000000203db4 0x0000000000203db4
0x0000000000 000030 0x0000000000000030 R 4
I rest my case ;-)