diff options
Diffstat (limited to 'libpthread/nptl')
-rw-r--r-- | libpthread/nptl/compat/libc-internal.h | 7 | ||||
-rw-r--r-- | libpthread/nptl/compat/libc-symbols.h | 12 | ||||
-rw-r--r-- | libpthread/nptl/pthread_create.c | 8 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/generic/libc-tls.c | 2 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c | 7 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/unwind-resume.c | 5 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c | 2 |
7 files changed, 19 insertions, 24 deletions
diff --git a/libpthread/nptl/compat/libc-internal.h b/libpthread/nptl/compat/libc-internal.h index 455e9b34b..0e29d83a9 100644 --- a/libpthread/nptl/compat/libc-internal.h +++ b/libpthread/nptl/compat/libc-internal.h @@ -27,13 +27,6 @@ extern void __cyg_profile_func_exit (void *this_fn, void *call_site); /* Get frequency of the system processor. */ extern hp_timing_t __get_clockfreq (void); -/* Free all allocated resources. */ -extern void __libc_freeres (void); -libc_hidden_proto (__libc_freeres) - -/* Free resources stored in thread-local variables on thread exit. */ -extern void __libc_thread_freeres (void); - /* Define and initialize `__progname' et. al. */ extern void __init_misc (int, char **, char **); diff --git a/libpthread/nptl/compat/libc-symbols.h b/libpthread/nptl/compat/libc-symbols.h index d364e857f..2c245d9d7 100644 --- a/libpthread/nptl/compat/libc-symbols.h +++ b/libpthread/nptl/compat/libc-symbols.h @@ -50,12 +50,6 @@ #define text_set_element(set, symbol) _elf_set_element(set, symbol) #define __sec_comment "\n\t#" -#define __libc_freeres_fn_section \ - __attribute__ ((section ("__libc_freeres_fn"))) -#define libc_freeres_fn(name) \ - static void name (void) __attribute_used__ __libc_freeres_fn_section; \ - text_set_element (__libc_subfreeres, name); \ - static void name (void) #if 0 # ifndef __ASSEMBLER__ @@ -164,12 +158,6 @@ # define attribute_tls_model_ie #endif -#ifdef HAVE_Z_RELRO -# define attribute_relro __attribute__ ((section (".data.rel.ro"))) -#else -# define attribute_relro -#endif - /* Define SET as a symbol set. This may be required (it is in a.out) to be able to use the set's contents. */ # define symbol_set_define(set) symbol_set_declare(set) diff --git a/libpthread/nptl/pthread_create.c b/libpthread/nptl/pthread_create.c index c83160c80..1dfdb7123 100644 --- a/libpthread/nptl/pthread_create.c +++ b/libpthread/nptl/pthread_create.c @@ -26,6 +26,7 @@ #include <ldsodefs.h> #include <atomic.h> #include <libc-internal.h> +#include <resolv.h> #include <shlib-compat.h> @@ -266,8 +267,10 @@ start_thread (void *arg) /* Run the destructor for the thread-local data. */ __nptl_deallocate_tsd (); +#ifndef __UCLIBC__ /* Clean up any state libc stored in thread-local variables. */ __libc_thread_freeres (); +#endif /* If this is the last thread we terminate the process now. We do not notify the debugger, it might just irritate it if there @@ -398,6 +401,11 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg) pd->schedpolicy = self->schedpolicy; pd->schedparam = self->schedparam; + /* Copy the stack guard canary. */ +#ifdef THREAD_COPY_STACK_GUARD + THREAD_COPY_STACK_GUARD (pd); +#endif + /* Determine scheduling parameters for the thread. */ if (attr != NULL && __builtin_expect ((iattr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0, 0) diff --git a/libpthread/nptl/sysdeps/generic/libc-tls.c b/libpthread/nptl/sysdeps/generic/libc-tls.c index cb451b252..5a71e3a60 100644 --- a/libpthread/nptl/sysdeps/generic/libc-tls.c +++ b/libpthread/nptl/sysdeps/generic/libc-tls.c @@ -200,7 +200,7 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign) # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" # endif if (__builtin_expect (lossage != NULL, 0)) - __libc_fatal (lossage); + abort(); /* We have to create a fake link map which normally would be created by the dynamic linker. It just has to have enough information to diff --git a/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c index 1c5bb1947..8b1f24407 100644 --- a/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c +++ b/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c @@ -22,10 +22,8 @@ #include <unwind.h> #include <pthreadP.h> -#ifdef __UCLIBC__ #define __libc_dlopen(x) dlopen(x, (RTLD_LOCAL | RTLD_LAZY)) #define __libc_dlsym dlsym -#endif static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); static _Unwind_Reason_Code (*libgcc_s_personality) @@ -56,7 +54,10 @@ pthread_cancel_init (void) || ARCH_CANCEL_INIT (handle) #endif ) - __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + { + printf("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + abort(); + } libgcc_s_resume = resume; libgcc_s_personality = personality; diff --git a/libpthread/nptl/sysdeps/pthread/unwind-resume.c b/libpthread/nptl/sysdeps/pthread/unwind-resume.c index 088f4c6f6..021024d49 100644 --- a/libpthread/nptl/sysdeps/pthread/unwind-resume.c +++ b/libpthread/nptl/sysdeps/pthread/unwind-resume.c @@ -37,7 +37,10 @@ init (void) if (handle == NULL || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL) - __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + { + printf("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); + abort(); + } libgcc_s_resume = resume; libgcc_s_personality = personality; diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c b/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c index 9707e4663..a73f6c421 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c @@ -109,6 +109,7 @@ __register_atfork (prepare, parent, child, dso_handle) libc_hidden_def (__register_atfork) +#ifndef __UCLIBC__ libc_freeres_fn (free_mem) { /* Get the lock to not conflict with running forks. */ @@ -133,3 +134,4 @@ libc_freeres_fn (free_mem) free (oldp); } } +#endif |