This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]