Commit Graph

8 Commits

Author SHA1 Message Date
matt 8caf10303e Put the startup code in .text.startup 2013-08-19 22:14:37 +00:00
matt 14d704c9e9 Add a workaround for older crt0.o that overwrite r2 (tcb pointer).
(save tcb pointer using _lwp_setprivate in ld.elf_so and retrieve the tcb
via _lwp_getprivate in libc and use it to restore the value in r2).
2011-04-07 02:19:28 +00:00
he 83a6b62058 It would be nice if lint knew that abort() will never return.
For now just insert a /* NOTREACHED */ comment to fix the build failure.
2011-03-18 14:56:01 +00:00
skrll a59f1998c0 Appease the hppa linker. 2011-03-17 22:13:58 +00:00
matt 69358e3723 Add PPC TLS support. Add -D_LIBC_SOURCE for tls.c and _lwp.c (powerpc)
so that __lwp_gettcb_fast and __lwp_settcb inlines are define.
2011-03-12 07:55:09 +00:00
matt d972b61c0e Use __lwp_settcb if available. 2011-03-12 07:52:37 +00:00
joerg 3b9c90a96e Define namespace remap macros before including sys/tls.h. 2011-03-09 23:50:40 +00:00
joerg aad599979d 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.
2011-03-09 23:10:05 +00:00