Re: cvs commit: src/sys/sys tls.h src/lib/libc/gen tls.c src/lib

看板DFBSD_commit作者時間21年前 (2005/03/29 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/14 (看更多)
Sorry, I was offline for a few days. On Sun, Mar 27, 2005 at 07:33:20PM -0800, Matthew Dillon wrote: > dillon 2005/03/27 19:33:20 PST > > DragonFly src repository > > Modified files: > sys/sys tls.h > lib/libc/gen tls.c > lib/libthread_xu/arch/amd64/amd64 pthread_md.c > lib/libthread_xu/arch/i386/i386 pthread_md.c > libexec/rtld-elf rtld.c rtld.h rtld_tls.h > libexec/rtld-elf/i386 reloc.c > Log: > Cleanup and retool portions of the TLS support and make sure that > non-threaded binaries remain compatible with older kernels. > > * Removes the tcb alignment argument. Instead an alignment #define is > placed in sys/tls.h I'd like to get rid of the size argument too. This should be split into machine/tls.h (with e.g. the struct tcb define) and sys/tls.h with the general system call. > * Gets rid of the Variant I code (we can add it in later, it just gets > in the way). That's why I wanted to use Variant I always. For the archive, there is one nasty thing -- statically linked binaries. For those, ld itself does the relocation and therefore it would have to be changed to go directly to positive offsets. > > * Retools the Variant II code to support %gs:OFFSET (negative offset) > AND %gs:0 relative accesses, supporting both -mtls-direct-seg-refs and > -mno-tls-direct-seg-refs. As Doug mentioned, this means m:n implementation has to do a syscall for thread switched. > * Changes the Elf_Addr array for the TCB into a real structure in > sys/tls.h There are a lot of places where Elf_Addr is used in the linker and void * is meant. I have a patch laying around to solve that, will commit it later. > > * Retains the DTV methodology. > > * Retains the TCB methodology, but note that the area 'after' the tcb > is now available for future use (at least with Variant I removed). > Frankly I'm not sure we would ever want to support having the > 'data' area after the TCB instead of before the TCB, at least not > for i386. Placing the TLS area after the TCB solves a lot of nasty problems :) Joerg
文章代碼(AID): #12I4QJ00 (DFBSD_commit)
討論串 (同標題文章)
完整討論串 (本文為第 2 之 14 篇):
文章代碼(AID): #12I4QJ00 (DFBSD_commit)