Re: How TLS is used in Kernel thread

2007-09-02 Thread Doug Rabson
On Thu, 2007-08-30 at 14:20 -0700, Jin Guojun wrote: > By looking through _pthread_create() code and find it uses a magic > cookie -- TLS -- created > by rtld_allocate_tls(), and passed into kernel by sysarch() via > _tcb_set() / _kcb_set(). > > The information seems to be set by rtld (ld-elf.so

How TLS is used in Kernel thread

2007-08-30 Thread Jin Guojun
By looking through _pthread_create() code and find it uses a magic cookie -- TLS -- created by rtld_allocate_tls(), and passed into kernel by sysarch() via _tcb_set() / _kcb_set(). The information seems to be set by rtld (ld-elf.so.1) in digest_phdr() under tag PT_TLS. But it is very magic for