[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: NPTL works and runs everything!

On Sat, Nov 02, 2002 at 04:41:09PM +0100, Luca Barbieri wrote:
> But can't we simply link errno to the errno that it would have been
> linked to with a non-NPTL/TLS library? (that AFAIK is the one of the
> main thread).

But it is technically impossible, unless the TLS errno is crippled
(ie. changing TLS errno from __thread int errno; into
__thread int *__errnop;
#define errno (*__errnop)
which is certainly something we don't want to do).
That is because binaries referencing errno GLIBC_2 0 have a copy reloc
against it, so they access errno in their .bss. But TLS accesses against
STT_TLS errno point into a per-thread TLS block, which obviously cannot be
in main binary's .bss section.

If there are non-COPY relocs references against errno GLIBC_2 0 (ie. badly
built shared library), it would be technically possible, but would slow down
very performance sensitive code (elf_machine_rel*), where the code would
have to test against such conditions and call __tls_get_addr () on it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]