[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 02:39:05PM +0100, Luca Barbieri wrote:
> The only remaining compatibility problem is the fact that with
> TLS-based glibcs, errno is no longer provided.
> IMHO the dynamic loader should be modified to link non-TLS symbols
> with TLS symbols belonging to the main thread.

Bad idea. TLS symbols need to be handled as different namespace from
non-TLS symbols and signal error when one tries to use non-TLS access
to TLS variable and vice versa.

For glibc 2.0 programs, which are the only ones which should ever reference
errno GLIBC_2 0 and not __errno_location GLIBC_2 1, ld.so can do something like:
  /* Force non-TLS libraries for glibc 2.0 binaries.  */
  if (GL(dl_loaded)->l_info[DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (DT_VERNEED)] == NULL)
    GL(dl_osversion) = 0x20205;
(in Red Hat glibc rpms we compile one set of libraries
with --enable-kernel=2.2.5, and NPTL libc.so/libpthread.so/librt.so/libm.so
would be compiled obviously with much more recent --enable-kernel).

Then there are broken glibc 2.1+ programs which are not bothered to
#include <errno.h> and either provide their own extern int errno;
or similar. Those just need fixed, until they are fixed one can run
those buggy programs or programs using such buggy libraries
with LD_ASSUME_KERNEL=2.2.5.

> Another problem is that stripping destroys my NPTL libc since strip
> moves things without fixing references (the fact that it moves things,
> one page forward, is probably the bug).

Yes, there is a bug in strip on some TLS libraries/binaries.
Have to finish the fix one day.

	Jakub





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