Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   joerg
Date:           Wed Mar  9 23:10:09 UTC 2011

Modified Files:
        src/distrib/sets/lists/comp: mi
        src/distrib/sets/lists/tests: mi
        src/etc/mtree: NetBSD.dist.tests
        src/lib/libc: Makefile
        src/lib/libc/misc: initfini.c
        src/lib/libpthread: pthread.c pthread_int.h
        src/libexec/ld.elf_so: Makefile TODO headers.c map_object.c rtld.c
            rtld.h symbol.c
        src/rescue: list.ldd
        src/sys/sys: Makefile
        src/tests/lib/libc: Makefile
        src/usr.bin/ldd: Makefile.elf ldd.c
        src/usr.bin/ldd/elf32: Makefile
        src/usr.bin/ldd/elf64: Makefile
Added Files:
        src/lib/libc/tls: Makefile.inc tls.c
        src/libexec/ld.elf_so: README.TLS tls.c
        src/sys/sys: tls.h
        src/tests/lib/libc/tls: Makefile t_tls_dlopen.c t_tls_dynamic.c
            t_tls_static.c t_tls_static_helper.c
        src/tests/lib/libc/tls/dso: Makefile h_tls_dlopen.c
        src/tests/lib/libc/tls_dso: Makefile h_tls_dynamic.c

Log Message:
Add TLS support infrastructure. For dynamic binaries, ld.elf_so exports
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to
setup the thread private area of all new threads. ld.elf_so is
responsible for setting up the private area for the initial thread.
Similar functions are called from _libc_init for static binaries, using
dl_iterate_phdr to access the ELF Program Header.

Add test cases to exercise the different TLS storage models. Test cases
are compiled and installed on all platforms, but are skipped on
platforms not marked for TLS support.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

It is inspired by the TLS support in FreeBSD by Doug Rabson and the
clean ups of the DragonFly port of the original FreeBSD modifications.


To generate a diff of this commit:
cvs rdiff -u -r1.1594 -r1.1595 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.262 -r1.263 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.30 -r1.31 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.143 -r1.144 src/lib/libc/Makefile
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/misc/initfini.c
cvs rdiff -u -r0 -r1.1 src/lib/libc/tls/Makefile.inc src/lib/libc/tls/tls.c
cvs rdiff -u -r1.120 -r1.121 src/lib/libpthread/pthread.c
cvs rdiff -u -r1.75 -r1.76 src/lib/libpthread/pthread_int.h
cvs rdiff -u -r1.102 -r1.103 src/libexec/ld.elf_so/Makefile
cvs rdiff -u -r0 -r1.1 src/libexec/ld.elf_so/README.TLS \
    src/libexec/ld.elf_so/tls.c
cvs rdiff -u -r1.4 -r1.5 src/libexec/ld.elf_so/TODO
cvs rdiff -u -r1.39 -r1.40 src/libexec/ld.elf_so/headers.c
cvs rdiff -u -r1.41 -r1.42 src/libexec/ld.elf_so/map_object.c
cvs rdiff -u -r1.138 -r1.139 src/libexec/ld.elf_so/rtld.c
cvs rdiff -u -r1.100 -r1.101 src/libexec/ld.elf_so/rtld.h
cvs rdiff -u -r1.54 -r1.55 src/libexec/ld.elf_so/symbol.c
cvs rdiff -u -r1.4 -r1.5 src/rescue/list.ldd
cvs rdiff -u -r1.131 -r1.132 src/sys/sys/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/sys/tls.h
cvs rdiff -u -r1.37 -r1.38 src/tests/lib/libc/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/tls/Makefile \
    src/tests/lib/libc/tls/t_tls_dlopen.c \
    src/tests/lib/libc/tls/t_tls_dynamic.c \
    src/tests/lib/libc/tls/t_tls_static.c \
    src/tests/lib/libc/tls/t_tls_static_helper.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/tls/dso/Makefile \
    src/tests/lib/libc/tls/dso/h_tls_dlopen.c
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/tls_dso/Makefile \
    src/tests/lib/libc/tls_dso/h_tls_dynamic.c
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/ldd/Makefile.elf
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/ldd/ldd.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/ldd/elf32/Makefile
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/ldd/elf64/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index