[PATCH] Make any ld.so able to load NPTL+sysenter libc/libpthread

Roland McGrath roland@redhat.com
Fri Dec 27 15:13:00 GMT 2002


I think we should move the list_t down in NPTL's tcbhead_t so that the
common parts are in the prefix.  Also, I just can't stand any more the
hand-diddled constants for struct member offsets.

I just added a script and makefile hack so you can add to e.g.
sysdeps/unix/sysv/linux/i386/Makefile:

gen-as-const-headers += tcb-offsets.sym

and put in tcb-offsets.sym:

#include <sysdep.h>
#include <tls.h>

#ifdef USE_TLS

MULTIPLE_THREADS_OFFSET		offsetof (tcbhead_t, multiple_threads)
# ifdef NEED_DL_SYSINFO
SYSINFO_OFFSET			offsetof (tcbhead_t, sysinfo)
# endif

#endif


and this will get you a tcb-offsets.h with:

#define MULTIPLE_THREADS_OFFSET 20
#define SYSINFO_OFFSET 24



More information about the Libc-hacker mailing list