Module Name: src
Committed By: joerg
Date: Thu Mar 10 17:38:30 UTC 2011
Modified Files:
src/libexec/ld.elf_so: README.TLS
Log Message:
Add some clarifications
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/libexec/ld.elf_so/README.TLS
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/ld.elf_so/README.TLS
diff -u src/libexec/ld.elf_so/README.TLS:1.3 src/libexec/ld.elf_so/README.TLS:1.4
--- src/libexec/ld.elf_so/README.TLS:1.3 Thu Mar 10 17:22:17 2011
+++ src/libexec/ld.elf_so/README.TLS Thu Mar 10 17:38:30 2011
@@ -13,8 +13,13 @@
ucontext_t, so the second option is possibly required.
(3) _lwp_setprivate(2) has to update the same register as
-_lwp_makecontext. cpu_lwp_setprivate has to call _lwp_setprivate(2) to
-reflect the kernel view. cpu_switch has to update the mapping.
+_lwp_makecontext uses for the private area pointer. Normally
+cpu_lwp_setprivate is provided by MD to reflect the kernel view and
+enabled by defining __HAVE_CPU_LWP_SETPRIVATE in machine/types.h.
+cpu_setmcontext is responsible for keeping the MI l_private field
+synchronised by calling lwp_setprivate as needed.
+
+cpu_switchto has to update the mapping.
_lwp_setprivate is used for the initial thread, all other threads
created by libpthread use _lwp_makecontext for this purpose.
@@ -24,7 +29,8 @@
only i386), also add a weak reference to 0 in src/lib/libc/tls/tls.c.
The generic implementation can be found in tls.c and is used with
-__HAVE_COMMON___TLS_GET_ADDR. It depends on ___lwp_getprivate_fast.
+__HAVE_COMMON___TLS_GET_ADDR. It depends on ___lwp_getprivate_fast
+(see below).
(5) Implement the necessary relocation records in mdreloc.c. There are
typically three relocation types found in dynamic binaries: