summaryrefslogtreecommitdiff
path: root/libpthread/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/Makefile.in54
-rw-r--r--libpthread/nptl/forward.c169
-rw-r--r--libpthread/nptl/init.c74
-rw-r--r--libpthread/nptl/pt-system.c35
-rw-r--r--libpthread/nptl/pthreadP.h7
-rw-r--r--libpthread/nptl/pthread_setgid.c3
-rw-r--r--libpthread/nptl/pthread_setuid.c3
-rw-r--r--libpthread/nptl/res.c26
-rw-r--r--libpthread/nptl/sysdeps/arm/Makefile.arch1
-rw-r--r--libpthread/nptl/sysdeps/arm/aeabi_read_tp.S1
-rw-r--r--libpthread/nptl/sysdeps/arm/thumb_atomics.S1
-rw-r--r--libpthread/nptl/sysdeps/metag/metag_load_tp.S7
-rw-r--r--libpthread/nptl/sysdeps/mips/nptl-sysdep.S2
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in51
-rw-r--r--libpthread/nptl/sysdeps/pthread/bits/libc-lock.h10
-rw-r--r--libpthread/nptl/sysdeps/pthread/pt-initfini.c128
-rw-r--r--libpthread/nptl/sysdeps/pthread/pt-sigaction.c7
-rw-r--r--libpthread/nptl/sysdeps/pthread/pthread-functions.h108
-rw-r--r--libpthread/nptl/sysdeps/pthread/setxid.h6
-rw-r--r--libpthread/nptl/sysdeps/pthread/uClibc-glue.h1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_error.c7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c13
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch5
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_error.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_rt_sigaction.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-__syscall_error.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c24
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c7
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-__syscall_rt_sigaction.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch5
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-__syscall_error.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/pt-sigwait.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c125
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch5
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-__syscall_error.c1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/pt-initfini.c134
-rw-r--r--libpthread/nptl/sysdeps/xtensa/Makefile.arch3
47 files changed, 19 insertions, 1040 deletions
diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in
index f0d5ad6..0fc83e2 100644
--- a/libpthread/nptl/Makefile.in
+++ b/libpthread/nptl/Makefile.in
@@ -12,14 +12,13 @@ libpthread_OUT = $(top_builddir)libpthread/nptl
include $(libpthread_DIR)/sysdeps/Makefile.in
-libc-shared-routines-y = forward.c libc-cancellation.c
+libc-shared-routines-y = libc-cancellation.c
libc-static-routines-y = alloca_cutoff.c libc-cancellation.c
libpthread-shared-only-routines-y = version.c
libpthread-static-only-routines-y = pthread_atfork.c
libpthread-routines- += $(notdir $(wildcard $(libpthread_DIR)/gen_*.c)) # dummy generated files
libpthread-routines- += allocatestack.c # dummy included by pthread_create.c
libpthread-routines- += pthread_mutex_getprioceiling.c pthread_mutex_setprioceiling.c # XXX: delete those or use them!
-libpthread-routines-$(UCLIBC_HAS_RESOLVER_SUPPORT) += res.c
libpthread-routines-$(UCLIBC_SUSV4_LEGACY) += pthread_getconcurrency.c \
pthread_setconcurrency.c
libpthread_CSRC = $(filter-out $(libpthread-routines-) \
@@ -42,6 +41,8 @@ else
libpthread-a-y := $(libpthread-static-y)
endif
+libpthread-a-y += $(top_builddir)lib/libpthread_nonshared.a
+
libc-shared-routines-y := $(filter-out $(notdir $(libpthread_libc_OBJS:.o=.c)), $(libc-shared-routines-y))
libc-static-routines-y := $(filter-out $(notdir $(libpthread_libc_OBJS:.o=.c)), $(libc-static-routines-y))
libc-shared-routines-y := $(addprefix $(libpthread_OUT)/,$(libc-shared-routines-y:.c=.oS))
@@ -63,37 +64,6 @@ librt-a-y += $(librt_OBJS)
endif
librt-so-y += $(librt_OBJS:.o=.oS) $(librt-pt-shared-only-routines-y:.o=.oS)
-ifeq ($(UCLIBC_CTOR_DTOR),y)
-START_FILE-libpthread.so := $(top_builddir)libpthread/nptl/sysdeps/pthread/pt-crti.o
-END_FILE-libpthread.so := $(top_builddir)libpthread/nptl/sysdeps/pthread/pt-crtn.o
-LDFLAGS-libpthread.so += -nostartfiles
-$(top_builddir)lib/libpthread.so: | $(START_FILE-libpthread.so) $(END_FILE-libpthread.so)
-endif
-
-libpthread_FULL_NAME := libpthread-$(VERSION).so
-lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
-lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so
-
-$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc.depend) $(libdl.depend) $(top_builddir)lib/libpthread_nonshared.a
- $(call link.so,$(libpthread_FULL_NAME),$(ABI_VERSION))
- # link for backward compatibility
- $(call link.so,$(libpthread_FULL_NAME),0)
- $(Q)cat $(top_srcdir)extra/scripts/format.lds > $@.tmp
- $(Q)echo "GROUP ( $(notdir $@).$(ABI_VERSION) libpthread_nonshared.a )" >> $@.tmp
- $(Q)mv $@.tmp $@
-
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-$(libpthread_OUT)/libpthread_so.a: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug)
-endif
-$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
- $(Q)$(RM) $@
- $(do_ar)
-
-$(top_builddir)lib/libpthread.a: $(libpthread-a-y)
- $(Q)$(INSTALL) -d $(dir $@)
- $(Q)$(RM) $@
- $(do_ar)
-
$(libpthread_OUT)/pthread-errnos.h: $(top_srcdir)extra/scripts/gen-as-const.awk
$(libpthread_OUT)/pthread-errnos.h: $(libpthread_DIR)/pthread-errnos.sym
@$(disp_gen)
@@ -132,17 +102,6 @@ HEADERCLEAN_libpthread/nptl:
CLEAN_libpthread/nptl:
$(do_rm) $(addprefix $(libpthread_OUT)/*., o os oS a)
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-LDFLAGS-libpthread.so += $(LDFLAGS_NOSTRIP) -Wl,-z,defs
-else
-LDFLAGS-libpthread.so += $(LDFLAGS)
-endif
-
-LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so \
- -Wl,-z,nodelete,-z,initfirst,-init=$(SYMBOL_PREFIX)__pthread_initialize_minimal_internal
-
-LIBS-libpthread.so := $(LIBS)
-
CFLAGS-dir_nptl := -DNOT_IN_libc -DIS_IN_libpthread
CFLAGS-libpthread/nptl := $(CFLAGS-dir_nptl) $(SSP_ALL_CFLAGS)
@@ -171,10 +130,6 @@ CFLAGS-libc-cancellation.c = -fasynchronous-unwind-tables
# function.
CFLAGS-pthread_exit.c = -fexceptions
-# Among others, __pthread_unwind is forwarded. This function must handle
-# exceptions.
-CFLAGS-forward.c = -fexceptions
-
# The following are cancellation points. Some of the functions can
# block and therefore temporarily enable asynchronous cancellation.
# Those must be compiled asynchronous unwind tables.
@@ -235,8 +190,6 @@ CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pt-system.c = -fexceptions -I$(top_srcdir)libc/stdlib
-
#
# The rest of this file is uClibc specific.
#
@@ -249,6 +202,5 @@ CFLAGS-pthread_barrierattr_setpshared.c = -D_GNU_SOURCE
CFLAGS-sem_open.c = -D_GNU_SOURCE
CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-dir_nptl)
-CFLAGS-OMIT-forward.c = $(CFLAGS-dir_nptl)
CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-dir_nptl)
CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-dir_nptl)
diff --git a/libpthread/nptl/forward.c b/libpthread/nptl/forward.c
deleted file mode 100644
index 076d437..0000000
--- a/libpthread/nptl/forward.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <dlfcn.h>
-#include <pthreadP.h>
-#include <signal.h>
-#include <stdlib.h>
-
-#include <atomic.h>
-#include <sysdep.h>
-
-
-/* Pointers to the libc functions. */
-struct pthread_functions __libc_pthread_functions attribute_hidden;
-int __libc_pthread_functions_init attribute_hidden;
-
-
-#define FORWARD2(name, rettype, decl, params, defaction) \
-rettype \
-name decl \
-{ \
- if (!__libc_pthread_functions_init) { \
- defaction; \
- } else { \
- return PTHFCT_CALL (ptr_##name, params); \
- } \
-}
-
-#define FORWARD(name, decl, params, defretval) \
- FORWARD2 (name, int, decl, params, return defretval)
-
-
-FORWARD (pthread_attr_destroy, (pthread_attr_t *attr), (attr), 0)
-
-FORWARD (__pthread_attr_init_2_1, (pthread_attr_t *attr), (attr), 0)
-weak_alias(__pthread_attr_init_2_1, pthread_attr_init)
-
-FORWARD (pthread_attr_getdetachstate,
- (const pthread_attr_t *attr, int *detachstate), (attr, detachstate),
- 0)
-FORWARD (pthread_attr_setdetachstate, (pthread_attr_t *attr, int detachstate),
- (attr, detachstate), 0)
-
-FORWARD (pthread_attr_getinheritsched,
- (const pthread_attr_t *attr, int *inherit), (attr, inherit), 0)
-FORWARD (pthread_attr_setinheritsched, (pthread_attr_t *attr, int inherit),
- (attr, inherit), 0)
-
-FORWARD (pthread_attr_getschedparam,
- (const pthread_attr_t *attr, struct sched_param *param),
- (attr, param), 0)
-FORWARD (pthread_attr_setschedparam,
- (pthread_attr_t *attr, const struct sched_param *param),
- (attr, param), 0)
-
-FORWARD (pthread_attr_getschedpolicy,
- (const pthread_attr_t *attr, int *policy), (attr, policy), 0)
-FORWARD (pthread_attr_setschedpolicy, (pthread_attr_t *attr, int policy),
- (attr, policy), 0)
-
-FORWARD (pthread_attr_getscope,
- (const pthread_attr_t *attr, int *scope), (attr, scope), 0)
-FORWARD (pthread_attr_setscope, (pthread_attr_t *attr, int scope),
- (attr, scope), 0)
-
-
-FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0)
-FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0)
-
-FORWARD (__pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0)
-weak_alias(__pthread_cond_broadcast, pthread_cond_broadcast)
-
-FORWARD (__pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0)
-weak_alias(__pthread_cond_destroy, pthread_cond_destroy)
-
-FORWARD (__pthread_cond_init,
- (pthread_cond_t *cond, const pthread_condattr_t *cond_attr),
- (cond, cond_attr), 0)
-weak_alias(__pthread_cond_init, pthread_cond_init)
-
-FORWARD (__pthread_cond_signal, (pthread_cond_t *cond), (cond), 0)
-weak_alias(__pthread_cond_signal, pthread_cond_signal)
-
-FORWARD (__pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex),
- (cond, mutex), 0)
-weak_alias(__pthread_cond_wait, pthread_cond_wait)
-
-FORWARD (__pthread_cond_timedwait,
- (pthread_cond_t *cond, pthread_mutex_t *mutex,
- const struct timespec *abstime), (cond, mutex, abstime), 0)
-weak_alias(__pthread_cond_timedwait, pthread_cond_timedwait)
-
-
-FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2),
- (thread1, thread2), 1)
-
-
-/* Use an alias to avoid warning, as pthread_exit is declared noreturn. */
-FORWARD2 (__pthread_exit, void, (void *retval), (retval), exit (EXIT_SUCCESS))
-strong_alias (__pthread_exit, pthread_exit);
-
-
-FORWARD (pthread_getschedparam,
- (pthread_t target_thread, int *policy, struct sched_param *param),
- (target_thread, policy, param), 0)
-FORWARD (pthread_setschedparam,
- (pthread_t target_thread, int policy,
- const struct sched_param *param), (target_thread, policy, param), 0)
-
-
-FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0)
-
-FORWARD (pthread_mutex_init,
- (pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr),
- (mutex, mutexattr), 0)
-
-FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0)
-weak_alias (pthread_mutex_lock, __pthread_mutex_lock)
-
-FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
-weak_alias (pthread_mutex_unlock, __pthread_mutex_unlock)
-
-FORWARD2 (pthread_self, pthread_t, (void), (), return 0)
-
-
-FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate),
- 0)
-
-FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
-
-#define return /* value is void */
-FORWARD2(_pthread_cleanup_push_defer,
- void, (struct _pthread_cleanup_buffer *buffer, void (*routine)(void *), void *arg),
- (buffer, routine, arg),
- { buffer->__routine = routine; buffer->__arg = arg; });
-
-FORWARD2(_pthread_cleanup_pop_restore,
- void, (struct _pthread_cleanup_buffer *buffer, int execute),
- (buffer, execute),
- if (execute) { buffer->__routine(buffer->__arg); });
-
-FORWARD2(__pthread_unwind,
- void attribute_hidden __attribute ((noreturn)) __cleanup_fct_attribute,
- (__pthread_unwind_buf_t *buf), (buf), {
- /* We cannot call abort() here. */
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (kill, err, 1, SIGKILL);
-#if __GNUC_PREREQ(4, 5)
- __builtin_unreachable();
-#else
- while(1);
-#endif
- })
-#undef return
diff --git a/libpthread/nptl/init.c b/libpthread/nptl/init.c
index eb84d6e..0e1c60c 100644
--- a/libpthread/nptl/init.c
+++ b/libpthread/nptl/init.c
@@ -60,77 +60,6 @@ int __have_futex_clock_realtime;
/* Version of the library, used in libthread_db to detect mismatches. */
static const char nptl_version[] __attribute_used__ = VERSION;
-#ifdef SHARED
-static void nptl_freeres (void);
-
-static const struct pthread_functions pthread_functions =
- {
- .ptr_pthread_attr_destroy = __pthread_attr_destroy,
- .ptr___pthread_attr_init_2_1 = __pthread_attr_init_2_1,
- .ptr_pthread_attr_getdetachstate = __pthread_attr_getdetachstate,
- .ptr_pthread_attr_setdetachstate = __pthread_attr_setdetachstate,
- .ptr_pthread_attr_getinheritsched = __pthread_attr_getinheritsched,
- .ptr_pthread_attr_setinheritsched = __pthread_attr_setinheritsched,
- .ptr_pthread_attr_getschedparam = __pthread_attr_getschedparam,
- .ptr_pthread_attr_setschedparam = __pthread_attr_setschedparam,
- .ptr_pthread_attr_getschedpolicy = __pthread_attr_getschedpolicy,
- .ptr_pthread_attr_setschedpolicy = __pthread_attr_setschedpolicy,
- .ptr_pthread_attr_getscope = __pthread_attr_getscope,
- .ptr_pthread_attr_setscope = __pthread_attr_setscope,
- .ptr_pthread_condattr_destroy = __pthread_condattr_destroy,
- .ptr_pthread_condattr_init = __pthread_condattr_init,
- .ptr___pthread_cond_broadcast = __pthread_cond_broadcast,
- .ptr___pthread_cond_destroy = __pthread_cond_destroy,
- .ptr___pthread_cond_init = __pthread_cond_init,
- .ptr___pthread_cond_signal = __pthread_cond_signal,
- .ptr___pthread_cond_wait = __pthread_cond_wait,
- .ptr___pthread_cond_timedwait = __pthread_cond_timedwait,
- .ptr_pthread_equal = __pthread_equal,
- .ptr___pthread_exit = __pthread_exit,
- .ptr_pthread_getschedparam = __pthread_getschedparam,
- .ptr_pthread_setschedparam = __pthread_setschedparam,
- .ptr_pthread_mutex_destroy = INTUSE(__pthread_mutex_destroy),
- .ptr_pthread_mutex_init = INTUSE(__pthread_mutex_init),
- .ptr_pthread_mutex_lock = INTUSE(__pthread_mutex_lock),
- .ptr_pthread_mutex_unlock = INTUSE(__pthread_mutex_unlock),
- .ptr_pthread_self = __pthread_self,
- .ptr_pthread_setcancelstate = __pthread_setcancelstate,
- .ptr_pthread_setcanceltype = __pthread_setcanceltype,
- .ptr___pthread_cleanup_upto = __pthread_cleanup_upto,
- .ptr___pthread_once = __pthread_once_internal,
- .ptr___pthread_rwlock_rdlock = __pthread_rwlock_rdlock_internal,
- .ptr___pthread_rwlock_wrlock = __pthread_rwlock_wrlock_internal,
- .ptr___pthread_rwlock_unlock = __pthread_rwlock_unlock_internal,
- .ptr___pthread_key_create = __pthread_key_create_internal,
- .ptr___pthread_getspecific = __pthread_getspecific_internal,
- .ptr___pthread_setspecific = __pthread_setspecific_internal,
- .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
- .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
- .ptr_nthreads = &__nptl_nthreads,
- .ptr___pthread_unwind = &__pthread_unwind,
- .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,
- .ptr__nptl_setxid = __nptl_setxid,
- /* For now only the stack cache needs to be freed. */
- .ptr_freeres = nptl_freeres
- };
-# define ptr_pthread_functions &pthread_functions
-#else
-# define ptr_pthread_functions NULL
-#endif
-
-
-#ifdef SHARED
-/* This function is called indirectly from the freeres code in libc. */
-static void
-__libc_freeres_fn_section
-nptl_freeres (void)
-{
- __unwind_freeres ();
- __free_stacks (0);
-}
-#endif
-
-
/* For asynchronous cancellation we use a signal. This is the handler. */
static void
sigcancel_handler (int sig, siginfo_t *si, void *ctx)
@@ -410,8 +339,7 @@ __pthread_initialize_minimal_internal (void)
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
__libc_multiple_threads_ptr =
#endif
- __libc_pthread_init (&__fork_generation, __reclaim_stacks,
- ptr_pthread_functions);
+ __libc_pthread_init (&__fork_generation, __reclaim_stacks);
/* Determine whether the machine is SMP or not. */
__is_smp = is_smp_system ();
diff --git a/libpthread/nptl/pt-system.c b/libpthread/nptl/pt-system.c
deleted file mode 100644
index 31567f0..0000000
--- a/libpthread/nptl/pt-system.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stdlib.h>
-#include <sysdep.h>
-#include "pthreadP.h"
-
-extern __typeof(system) __libc_system;
-#include <system.c>
-
-
-int
-system (const char *line)
-{
- return __libc_system (line);
-}
-
-/* __libc_system in libc.so handles cancellation. */
-LIBC_CANCEL_HANDLED ();
diff --git a/libpthread/nptl/pthreadP.h b/libpthread/nptl/pthreadP.h
index f46dd40..a2aa5a0 100644
--- a/libpthread/nptl/pthreadP.h
+++ b/libpthread/nptl/pthreadP.h
@@ -28,7 +28,6 @@
#include <lowlevellock.h>
#include <bits/stackinfo.h>
#include <internaltypes.h>
-#include <pthread-functions.h>
#include <atomic.h>
#include <bits/kernel-features.h>
@@ -377,12 +376,10 @@ hidden_proto (__nptl_death_event)
/* Register the generation counter in the libpthread with the libc. */
#ifdef TLS_MULTIPLE_THREADS_IN_TCB
extern void __libc_pthread_init (unsigned long int *ptr,
- void (*reclaim) (void),
- const struct pthread_functions *functions);
+ void (*reclaim) (void));
#else
extern int *__libc_pthread_init (unsigned long int *ptr,
- void (*reclaim) (void),
- const struct pthread_functions *functions);
+ void (*reclaim) (void));
/* Variable set to a nonzero value if more than one thread runs or ran. */
extern int __pthread_multiple_threads attribute_hidden;
diff --git a/libpthread/nptl/pthread_setgid.c b/libpthread/nptl/pthread_setgid.c
deleted file mode 100644
index b06bffb..0000000
--- a/libpthread/nptl/pthread_setgid.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define SINGLE_THREAD
-#define __setgid pthread_setgid_np
-#include <setgid.c>
diff --git a/libpthread/nptl/pthread_setuid.c b/libpthread/nptl/pthread_setuid.c
deleted file mode 100644
index ff949c8..0000000
--- a/libpthread/nptl/pthread_setuid.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#define SINGLE_THREAD
-#define __setuid pthread_setuid_np
-#include <setuid.c>
diff --git a/libpthread/nptl/res.c b/libpthread/nptl/res.c
deleted file mode 100644
index 3ce84ea..0000000
--- a/libpthread/nptl/res.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <features.h>
-#include <tls.h>
-#include <resolv.h>
-
-struct __res_state *
-__res_state (void)
-{
- return __resp;
-}
diff --git a/libpthread/nptl/sysdeps/arm/Makefile.arch b/libpthread/nptl/sysdeps/arm/Makefile.arch
index 62a2822..c190b9a 100644
--- a/libpthread/nptl/sysdeps/arm/Makefile.arch
+++ b/libpthread/nptl/sysdeps/arm/Makefile.arch
@@ -6,5 +6,4 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-librt_arch_SSRC = aeabi_read_tp.S thumb_atomics.S
libc_arch_a_CSRC = libc-tls.c
diff --git a/libpthread/nptl/sysdeps/arm/aeabi_read_tp.S b/libpthread/nptl/sysdeps/arm/aeabi_read_tp.S
deleted file mode 100644
index af640d6..0000000
--- a/libpthread/nptl/sysdeps/arm/aeabi_read_tp.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../ldso/ldso/arm/aeabi_read_tp.S>
diff --git a/libpthread/nptl/sysdeps/arm/thumb_atomics.S b/libpthread/nptl/sysdeps/arm/thumb_atomics.S
deleted file mode 100644
index aaa7a3d..0000000
--- a/libpthread/nptl/sysdeps/arm/thumb_atomics.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../ldso/ldso/arm/thumb_atomics.S>
diff --git a/libpthread/nptl/sysdeps/metag/metag_load_tp.S b/libpthread/nptl/sysdeps/metag/metag_load_tp.S
deleted file mode 100644
index f17f7de..0000000
--- a/libpthread/nptl/sysdeps/metag/metag_load_tp.S
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Copyright (C) 2013 Imagination Technologies Ltd.
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-#include <../../../../ldso/ldso/metag/metag_load_tp.S>
diff --git a/libpthread/nptl/sysdeps/mips/nptl-sysdep.S b/libpthread/nptl/sysdeps/mips/nptl-sysdep.S
deleted file mode 100644
index 7a4a8d3..0000000
--- a/libpthread/nptl/sysdeps/mips/nptl-sysdep.S
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Pull in __syscall_error. */
-#include <syscall_error.S>
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index 9d99f31..a501b64 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -43,62 +43,11 @@ CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE
CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-OMIT-librt-cancellation.c = -DIS_IN_libpthread
-CFLAGS-OMIT-rt-unwind-resume.c = -DIS_IN_libpthread
CFLAGS-librt-cancellation.c = -DIS_IN_librt \
-fexceptions -fasynchronous-unwind-tables
-CFLAGS-rt-unwind-resume.c = -DIS_IN_librt \
- -fexceptions -fasynchronous-unwind-tables
-
libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, unwind-forcedunwind)
librt-pt-routines-y = librt-cancellation.c
-librt-pt-shared-only-routines-y = rt-unwind-resume.c
-
-ifeq ($(UCLIBC_CTOR_DTOR),y)
-CFLAGS-OMIT-pt-initfini.c = $(CFLAGS-y-libpthread/nptl/sysdeps/pthread)
-CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions \
- $(call check_gcc,-fno-unit-at-a-time,) \
- $(SSP_DISABLE_FLAGS) \
- -finhibit-size-directive \
- -fno-asynchronous-unwind-tables -fno-unwind-tables \
- $(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,))
-
-#ASFLAGS += $(PICFLAG) -I$(top_srcdir)include -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
-ifneq ($(wildcard $(libpthread_pthread_DIR)/../unix/sysv/linux/$(TARGET_ARCH)/pt-initfini.c),)
-PTHREAD_INITFINI := $(libpthread_pthread_DIR)/../unix/sysv/linux/$(TARGET_ARCH)/pt-initfini.c
-else
-PTHREAD_INITFINI := $(libpthread_pthread_DIR)/pt-initfini.c
-endif
-
-ASFLAGS-pt-crti.S = $(PICFLAG)
-ASFLAGS-pt-crtn.S = $(PICFLAG)
-
-$(libpthread_pthread_OUT)/pt-crti.o: $(libpthread_pthread_OUT)/pt-crti.S
- $(compile.S)
-
-$(libpthread_pthread_OUT)/pt-crtn.o: $(libpthread_pthread_OUT)/pt-crtn.S
- $(compile.S)
-
-$(libpthread_pthread_OUT)/pt-initfini.s: $(PTHREAD_INITFINI) | $(headers_dep)
- $(compile.c)
-$(libpthread_pthread_OUT)/defs.h: $(PTHREAD_INITFINI)
- $(do_sed) -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
- $(AWK) -f $(top_srcdir)extra/scripts/defs.awk > $@.tmp
- $(Q)mv $@.tmp $@
-
-$(libpthread_pthread_OUT)/pt-crti.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h
- $(do_sed) -n -e '/[ ]*\.file/d' \
- -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp
- $(Q)mv $@.tmp $@
-$(libpthread_pthread_OUT)/pt-crtn.S: $(libpthread_pthread_OUT)/pt-initfini.s $(libpthread_pthread_OUT)/defs.h
- $(do_sed) -n -e '/[ ]*\.file/d' \
- -e '1,/@HEADER_ENDS/p' \
- -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
- -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp
- $(Q)mv $@.tmp $@
-endif
objclean-y += CLEAN_libpthread/nptl/sysdeps/pthread
diff --git a/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h b/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h
index 633021a..a4c5b62 100644
--- a/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h
+++ b/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h
@@ -34,7 +34,6 @@
#ifdef _LIBC
# include <lowlevellock.h>
# include <tls.h>
-# include <pthread-functions.h>
#endif
/* Mutex type. */
@@ -152,20 +151,11 @@ typedef pthread_key_t __libc_key_t;
(FUNC != NULL ? FUNC ARGS : ELSE)
#endif
-/* Call thread functions through the function pointer table. */
-#if defined SHARED && !defined NOT_IN_libc
-# define PTFAVAIL(NAME) __libc_pthread_functions_init
-# define __libc_ptf_call(FUNC, ARGS, ELSE) \
- (__libc_pthread_functions_init ? PTHFCT_CALL (ptr_##FUNC, ARGS) : ELSE)
-# define __libc_ptf_call_always(FUNC, ARGS) \
- PTHFCT_CALL (ptr_##FUNC, ARGS)
-#else
# define PTFAVAIL(NAME) (NAME != NULL)
# define __libc_ptf_call(FUNC, ARGS, ELSE) \
__libc_maybe_call (FUNC, ARGS, ELSE)
# define __libc_ptf_call_always(FUNC, ARGS) \
FUNC ARGS
-#endif
/* Initialize the named lock variable, leaving it in a consistent, unlocked
diff --git a/libpthread/nptl/sysdeps/pthread/pt-initfini.c b/libpthread/nptl/sysdeps/pthread/pt-initfini.c
deleted file mode 100644
index d9881c7..0000000
--- a/libpthread/nptl/sysdeps/pthread/pt-initfini.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Special .init and .fini section support. Linuxthread version.
- Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it
- and/or modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Library General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- The GNU C Library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- see <http://www.gnu.org/licenses/>. */
-
-/* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
-
- * crti.s puts a function prologue at the beginning of the
- .init and .fini sections and defines global symbols for
- those addresses, so they can be called as functions.
-
- * crtn.s puts the corresponding function epilogues
- in the .init and .fini sections. */
-
-#include <stdlib.h>
-
-/* We use embedded asm for .section unconditionally, as this makes it
- easier to insert the necessary directives into crtn.S. */
-#define SECTION(x) __asm__ (".section " x )
-
-/* Embed an #include to pull in the alignment and .end directives. */
-__asm__ ("\n#include \"defs.h\"");
-__asm__ ("\n#if defined __i686 && defined __ASSEMBLER__");
-__asm__ ("\n#undef __i686");
-__asm__ ("\n#define __i686 __i686");
-__asm__ ("\n#endif");
-
-/* The initial common code ends here. */
-__asm__ ("\n/*@HEADER_ENDS*/");
-
-/* To determine whether we need .end and .align: */
-__asm__ ("\n/*@TESTS_BEGIN*/");
-extern void dummy (void (*foo) (void));
-void
-dummy (void (*foo) (void))
-{
- if (foo)
- (*foo) ();
-}
-__asm__ ("\n/*@TESTS_END*/");
-
-/* The beginning of _init: */
-__asm__ ("\n/*@_init_PROLOG_BEGINS*/");
-
-static void
-call_initialize_minimal (void)
-{
- extern void __pthread_initialize_minimal_internal (void)
- __attribute ((visibility ("hidden")));
-
- __pthread_initialize_minimal_internal ();
-}
-
-SECTION (".init");
-extern void __attribute__ ((section (".init"))) _init (void);
-void
-_init (void)
-{
- /* The very first thing we must do is to set up the registers. */
- call_initialize_minimal ();
-
- __asm__ ("ALIGN");
- __asm__("END_INIT");
- /* Now the epilog. */
- __asm__ ("\n/*@_init_PROLOG_ENDS*/");
- __asm__ ("\n/*@_init_EPILOG_BEGINS*/");
- SECTION(".init");
-}
-__asm__ ("END_INIT");
-
-/* End of the _init epilog, beginning of the _fini prolog. */
-__asm__ ("\n/*@_init_EPILOG_ENDS*/");
-__asm__ ("\n/*@_fini_PROLOG_BEGINS*/");
-
-SECTION (".fini");
-extern void __attribute__ ((section (".fini"))) _fini (void);
-void
-_fini (void)
-{
-
- /* End of the _fini prolog. */
- __asm__ ("ALIGN");
- __asm__ ("END_FINI");
- __asm__ ("\n/*@_fini_PROLOG_ENDS*/");
-
- {
- /* Let GCC know that _fini is not a leaf function by having a dummy
- function call here. We arrange for this call to be omitted from
- either crt file. */
- extern void i_am_not_a_leaf (void);
- i_am_not_a_leaf ();
- }
-
- /* Beginning of the _fini epilog. */
- __asm__ ("\n/*@_fini_EPILOG_BEGINS*/");
- SECTION (".fini");
-}
-__asm__ ("END_FINI");
-
-/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
- is shared between both crt files. */
-__asm__ ("\n/*@_fini_EPILOG_ENDS*/");
-__asm__ ("\n/*@TRAILER_BEGINS*/");
-
-/* End of file. */
diff --git a/libpthread/nptl/sysdeps/pthread/pt-sigaction.c b/libpthread/nptl/sysdeps/pthread/pt-sigaction.c
index 43a2da2..d8fa4c9 100644
--- a/libpthread/nptl/sysdeps/pthread/pt-sigaction.c
+++ b/libpthread/nptl/sysdeps/pthread/pt-sigaction.c
@@ -22,9 +22,10 @@
/* We use the libc implementation but we tell it to not allow
SIGCANCEL or SIGTIMER to be handled. */
+libc_hidden_proto(sigaction)
extern __typeof(sigaction) __libc_sigaction;
int
-__sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
+sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
if (unlikely (sig == SIGCANCEL || sig == SIGSETXID))
{
@@ -34,6 +35,4 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
return __libc_sigaction (sig, act, oact);
}
-libc_hidden_proto(sigaction)
-weak_alias (__sigaction, sigaction)
-libc_hidden_weak(sigaction)
+libc_hidden_def(sigaction)
diff --git a/libpthread/nptl/sysdeps/pthread/pthread-functions.h b/libpthread/nptl/sysdeps/pthread/pthread-functions.h
deleted file mode 100644
index 9c78180..0000000
--- a/libpthread/nptl/sysdeps/pthread/pthread-functions.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _PTHREAD_FUNCTIONS_H
-#define _PTHREAD_FUNCTIONS_H 1
-
-#include <pthread.h>
-#include <setjmp.h>
-#include <internaltypes.h>
-#include <sysdep.h>
-
-struct xid_command;
-
-/* Data type shared with libc. The libc uses it to pass on calls to
- the thread functions. */
-struct pthread_functions
-{
- int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
- int (*ptr___pthread_attr_init_2_0) (pthread_attr_t *);
- int (*ptr___pthread_attr_init_2_1) (pthread_attr_t *);
- int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
- int (*ptr_pthread_attr_setdetachstate) (pthread_attr_t *, int);
- int (*ptr_pthread_attr_getinheritsched) (const pthread_attr_t *, int *);
- int (*ptr_pthread_attr_setinheritsched) (pthread_attr_t *, int);
- int (*ptr_pthread_attr_getschedparam) (const pthread_attr_t *,
- struct sched_param *);
- int (*ptr_pthread_attr_setschedparam) (pthread_attr_t *,
- const struct sched_param *);
- int (*ptr_pthread_attr_getschedpolicy) (const pthread_attr_t *, int *);
- int (*ptr_pthread_attr_setschedpolicy) (pthread_attr_t *, int);
- int (*ptr_pthread_attr_getscope) (const pthread_attr_t *, int *);
- int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int);
- int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *);
- int (*ptr_pthread_condattr_init) (pthread_condattr_t *);
- int (*ptr___pthread_cond_broadcast) (pthread_cond_t *);
- int (*ptr___pthread_cond_destroy) (pthread_cond_t *);
- int (*ptr___pthread_cond_init) (pthread_cond_t *,
- const pthread_condattr_t *);
- int (*ptr___pthread_cond_signal) (pthread_cond_t *);
- int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *);
- int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
- const struct timespec *);
- int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *);
- int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *);
- int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *,
- const pthread_condattr_t *);
- int (*ptr___pthread_cond_signal_2_0) (pthread_cond_2_0_t *);
- int (*ptr___pthread_cond_wait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *);
- int (*ptr___pthread_cond_timedwait_2_0) (pthread_cond_2_0_t *,
- pthread_mutex_t *,
- const struct timespec *);
- int (*ptr_pthread_equal) (pthread_t, pthread_t);
- void (*ptr___pthread_exit) (void *);
- int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *);
- int (*ptr_pthread_setschedparam) (pthread_t, int,
- const struct sched_param *);
- int (*ptr_pthread_mutex_destroy) (pthread_mutex_t *);
- int (*ptr_pthread_mutex_init) (pthread_mutex_t *,
- const pthread_mutexattr_t *);
- int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
- int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
- pthread_t (*ptr_pthread_self) (void);
- int (*ptr_pthread_setcancelstate) (int, int *);
- int (*ptr_pthread_setcanceltype) (int, int *);
- void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *);
- int (*ptr___pthread_once) (pthread_once_t *, void (*) (void));
- int (*ptr___pthread_rwlock_rdlock) (pthread_rwlock_t *);
- int (*ptr___pthread_rwlock_wrlock) (pthread_rwlock_t *);
- int (*ptr___pthread_rwlock_unlock) (pthread_rwlock_t *);
- int (*ptr___pthread_key_create) (pthread_key_t *, void (*) (void *));
- void *(*ptr___pthread_getspecific) (pthread_key_t);
- int (*ptr___pthread_setspecific) (pthread_key_t, const void *);
- void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer *,
- void (*) (void *), void *);
- void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer *,
- int);
-#define HAVE_PTR_NTHREADS
- unsigned int *ptr_nthreads;
- void (*ptr___pthread_unwind) (__pthread_unwind_buf_t *)
- __attribute ((noreturn)) __cleanup_fct_attribute;
- void (*ptr__nptl_deallocate_tsd) (void);
- int (*ptr__nptl_setxid) (struct xid_command *);
- void (*ptr_freeres) (void);
-};
-
-/* Variable in libc.so. */
-extern struct pthread_functions __libc_pthread_functions attribute_hidden;
-extern int __libc_pthread_functions_init attribute_hidden;
-
-# define PTHFCT_CALL(fct, params) \
- __libc_pthread_functions.fct params
-
-#endif /* pthread-functions.h */
diff --git a/libpthread/nptl/sysdeps/pthread/setxid.h b/libpthread/nptl/sysdeps/pthread/setxid.h
index 9331649..c2763cd 100644
--- a/libpthread/nptl/sysdeps/pthread/setxid.h
+++ b/libpthread/nptl/sysdeps/pthread/setxid.h
@@ -32,15 +32,11 @@
# define INLINE_SETXID_SYSCALL(name, nr, args...) \
({ \
int __result; \
- if (__builtin_expect (__libc_pthread_functions_init, 0)) \
- { \
struct xid_command __cmd; \
__cmd.syscall_no = __NR_##name; \
__SETXID_##nr (__cmd, args); \
- __result = PTHFCT_CALL (ptr__nptl_setxid, (&__cmd)); \
+ __result = PTHFCT_CALL (__nptl_setxid, (&__cmd)); \
} \
- else \
- __result = INLINE_SYSCALL (name, nr, args); \
__result; \
})
#else
diff --git a/libpthread/nptl/sysdeps/pthread/uClibc-glue.h b/libpthread/nptl/sysdeps/pthread/uClibc-glue.h
index b957ded..46f8f87 100644
--- a/libpthread/nptl/sysdeps/pthread/uClibc-glue.h
+++ b/libpthread/nptl/sysdeps/pthread/uClibc-glue.h
@@ -26,7 +26,6 @@
#define __read read
#define __close close
#define __on_exit on_exit
-#define __libc_current_sigrtmin_private __libc_current_sigrtmin
#define __clone clone
extern void *__libc_stack_end;
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
index 57481fd..649d188 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
@@ -62,7 +62,6 @@ libpthread_linux_CSRC += pthread_attr_getaffinity.c pthread_attr_setaffinity.c \
pthread_getcpuclockid.c pthread_kill.c \
pthread_mutex_cond_lock.c pthread_yield.c \
sem_post.c sem_timedwait.c sem_trywait.c sem_wait.c \
- pt-tempname.c \
pthread_sigqueue.c \
lowlevellock.c lowlevelrobustlock.c
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
index 468e646..fa5d530 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
@@ -6,8 +6,7 @@
#
libpthread_linux_arch_SSRC =
-libpthread_linux_arch_CSRC = pthread_once.c \
- pt-__syscall_rt_sigaction.c pt-__syscall_error.c
+libpthread_linux_arch_CSRC = pthread_once.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_error.c
deleted file mode 100644
index 8002e65..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_error.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-#include <../../../../../../../libc/sysdeps/linux/arc/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c
deleted file mode 100644
index 967dad1..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/pt-__syscall_rt_sigaction.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-/*
- * ARC syscall ABI only has __NR_rt_sigaction, thus vanilla sigaction does
- * some SA_RESTORER tricks before calling __syscall_rt_sigaction.
- * However including that file here causes a redefinition of __libc_sigaction
- * in static links involving pthreads
- */
-//#include <../../../../../../../libc/sysdeps/linux/arc/sigaction.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
index 80a0306..49d0684 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
@@ -6,8 +6,7 @@
#
libpthread_linux_arch_SSRC =
-libpthread_linux_arch_CSRC = pthread_once.c \
- pt-__syscall_rt_sigaction.c pt-__syscall_error.c
+libpthread_linux_arch_CSRC = pthread_once.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S
@@ -16,7 +15,5 @@ libc_linux_arch_SSRC-OMIT = waitpid.S
# We always compile it in arm mode because of SAVE_PID macro
# This macro should be alternatively implemented in THUMB
# assembly.
-ASFLAGS-pt-vfork.S = -marm
-CFLAGS-OMIT-pt-vfork.S = -mthumb
ASFLAGS-vfork.S = -marm
CFLAGS-OMIT-vfork.S = -mthumb
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_error.c
deleted file mode 100644
index 5a48a9b..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_error.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/arm/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_rt_sigaction.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_rt_sigaction.c
deleted file mode 100644
index 50137c8..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-__syscall_rt_sigaction.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/common/__syscall_rt_sigaction.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
index 9dc878c..be07d9c 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
@@ -6,7 +6,7 @@
#
libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S
-libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c
+libpthread_linux_arch_CSRC = pthread_spin_init.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-__syscall_error.c
deleted file mode 100644
index 620640a..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-__syscall_error.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/i386/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
index 67587f4..6013ab0 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
@@ -27,13 +27,6 @@ extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
void
_longjmp_unwind (jmp_buf env, int val)
{
-#ifdef SHARED
- if (__libc_pthread_functions_init)
- PTHFCT_CALL (ptr___pthread_cleanup_upto, (env->__jmpbuf,
- CURRENT_STACK_FRAME));
-#else
- if (__pthread_cleanup_upto != NULL)
__pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
-#endif
}
libc_hidden_def(_longjmp_unwind)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
index cc8d390..0df9951 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
@@ -37,8 +37,7 @@ int *
#endif
__libc_pthread_init (
unsigned long int *ptr,
- void (*reclaim) (void),
- const struct pthread_functions *functions)
+ void (*reclaim) (void))
{
/* Remember the pointer to the generation counter in libpthread. */
__fork_generation_pointer = ptr;
@@ -46,28 +45,7 @@ __libc_pthread_init (
/* Called by a child after fork. */
__register_atfork (NULL, NULL, reclaim, NULL);
-#ifdef SHARED
- /* We copy the content of the variable pointed to by the FUNCTIONS
- parameter to one in libc.so since this means access to the array
- can be done with one memory access instead of two.
- */
- memcpy (&__libc_pthread_functions, functions,
- sizeof (__libc_pthread_functions));
- __libc_pthread_functions_init = 1;
-#endif
-
#ifndef TLS_MULTIPLE_THREADS_IN_TCB
return &__libc_multiple_threads;
#endif
}
-
-#ifdef SHARED
-#if 0
-void
-libc_freeres_fn (freeres_libptread)
-{
- if (__libc_pthread_functions_init)
- PTHFCT_CALL (ptr_freeres, ());
-}
-#endif
-#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
index b38c375..0f4d8d3 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
@@ -6,8 +6,7 @@
#
libpthread_linux_arch_SSRC =
-libpthread_linux_arch_CSRC = pthread_once.c \
- pt-__syscall_rt_sigaction.c pt-__syscall_error.c
+libpthread_linux_arch_CSRC = pthread_once.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c
deleted file mode 100644
index 8f97734..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Copyright (C) 2013 Imagination Technologies Ltd.
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-#include <../../../../../../../libc/sysdeps/linux/metag/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c
deleted file mode 100644
index 18769ca..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Copyright (C) 2013 Imagination Technologies Ltd.
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-#include <../../../../../../../libc/sysdeps/linux/common/__syscall_rt_sigaction.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
index f87dedc..565efd4 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
@@ -6,7 +6,7 @@
#
libpthread_linux_arch_SSRC = clone.S
-libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c
+libpthread_linux_arch_CSRC = pthread_once.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-__syscall_rt_sigaction.c b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-__syscall_rt_sigaction.c
deleted file mode 100644
index 50137c8..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-__syscall_rt_sigaction.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/common/__syscall_rt_sigaction.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
index df4bb69..2abb1d2 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
@@ -6,13 +6,10 @@
#
libpthread_linux_arch_SSRC =
-libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c
+libpthread_linux_arch_CSRC = pthread_once.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S
-# powerpc32's PSEUDO_RET needs __syscall_error@local
-librt_linux_arch_CSRC = pt-__syscall_error.c
-
ASFLAGS += -DUSE___THREAD
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-__syscall_error.c
deleted file mode 100644
index 2a402e5..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-__syscall_error.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/powerpc/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-sigwait.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pt-sigwait.c
deleted file mode 100644
index bde0a92..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/pt-sigwait.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <pthreadP.h>
-#include "../../../../../../libc/signal/sigwait.c"
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
deleted file mode 100644
index 71fef93..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* Special .init and .fini section support for SH. NPTL version.
- Copyright (C) 2003, 2009 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it
- and/or modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Library General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Library General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- The GNU C Library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- see <http://www.gnu.org/licenses/>. */
-
-/* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
-
- * crti.s puts a function prologue at the beginning of the
- .init and .fini sections and defines global symbols for
- those addresses, so they can be called as functions.
-
- * crtn.s puts the corresponding function epilogues
- in the .init and .fini sections. */
-
-__asm__ ("\n\
-\n\
-#include \"defs.h\"\n\
-\n\
-/*@HEADER_ENDS*/\n\
-\n\
-/*@TESTS_BEGIN*/\n\
-\n\
-/*@TESTS_END*/\n\
-\n\
-/*@_init_PROLOG_BEGINS*/\n\
- .section .init\n\
- .align 5\n\
- .global _init\n\
- .type _init,@function\n\
-_init:\n\
- mov.l r12,@-r15\n\
- mov.l r14,@-r15\n\
- sts.l pr,@-r15\n\
- mova .L22,r0\n\
- mov.l .L22,r12\n\
- add r0,r12\n\
- mova .L24,r0\n\
- mov.l .L24,r1\n\
- add r0,r1\n\
- jsr @r1\n\
- mov r15,r14\n\
- bra 1f\n\
- nop\n\
- .align 2\n\
-.L22:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-.L24:\n\
- .long __pthread_initialize_minimal_internal@PLT\n\
-1:\n\
- ALIGN\n\
- END_INIT\n\
-\n\
-/*@_init_PROLOG_ENDS*/\n\
-\n\
-/*@_init_EPILOG_BEGINS*/\n\
- .section .init\n\
- mov r14,r15\n\
- lds.l @r15+,pr\n\
- mov.l @r15+,r14\n\
- rts \n\
- mov.l @r15+,r12\n\
- END_INIT\n\
- \n\
-/*@_init_EPILOG_ENDS*/\n\
-\n\
-/*@_fini_PROLOG_BEGINS*/\n\
- .section .fini\n\
- .align 5\n\
- .global _fini\n\
- .type _fini,@function\n\
-_fini:\n\
- mov.l r12,@-r15\n\
- mov.l r14,@-r15\n\
- sts.l pr,@-r15\n\
- mova .L27,r0\n\
- mov.l .L27,r12\n\
- add r0,r12\n\
- mov r15,r14\n\
- ALIGN\n\
- END_FINI\n\
- bra 1f\n\
- nop\n\
- .align 2\n\
-.L27:\n\
- .long _GLOBAL_OFFSET_TABLE_\n\
-1:\n\
-/*@_fini_PROLOG_ENDS*/\n\
-\n\
-/*@_fini_EPILOG_BEGINS*/\n\
- .section .fini\n\
- mov r14,r15\n\
- lds.l @r15+,pr\n\
- mov.l @r15+,r14\n\
- rts \n\
- mov.l @r15+,r12\n\
-\n\
- END_FINI\n\
- \n\
-/*@_fini_EPILOG_ENDS*/\n\
-\n\
-/*@TRAILER_BEGINS*/\n\
-");
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
index 01a9e87..f93ad4d 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
@@ -7,13 +7,10 @@
libpthread_linux_arch_SSRC = clone.S
libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
- pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \
- pt-__syscall_error.c
+ pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c
libc_linux_arch_CSRC = fork.c libc-lowlevellock.c
libc_linux_arch_SSRC = clone.S vfork.S
-librt_linux_arch_CSRC = pt-__syscall_error.c
-
ASFLAGS += -DUSE___THREAD
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c
deleted file mode 100644
index 872e4ef..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/sparc/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
index b49db54..b48f4cb 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
@@ -11,7 +11,7 @@ libpthread_linux_arch_SSRC = clone.S pthread_once.S \
sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
pthread_rwlock_timedrdlock.S pthread_rwlock_timedwrlock.S pthread_rwlock_unlock.S \
pthread_spin_unlock.S cancellation.S
-libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c
+libpthread_linux_arch_CSRC = pthread_spin_init.c
libc_linux_arch_CSRC = fork.c
libc_linux_arch_SSRC = clone.S vfork.S libc-cancellation.S libc-lowlevellock.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-__syscall_error.c
deleted file mode 100644
index 2ab8149..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-__syscall_error.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <../../../../../../../libc/sysdeps/linux/x86_64/__syscall_error.c>
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch
index 8ebe287..7014c3f 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/Makefile.arch
@@ -7,7 +7,6 @@ libpthread_linux_arch_CSRC = pthread_once.c
libpthread_linux_arch_SSRC =
CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
ASFLAGS-clone.S = -D_LIBC_REENTRANT
ASFLAGS-vfork.S = -D_LIBC_REENTRANT
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/pt-initfini.c b/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/pt-initfini.c
deleted file mode 100644
index 4e6d26e..0000000
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/xtensa/pt-initfini.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Special .init and .fini section support. Linuxthread version.
- Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it
- and/or modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Library General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- The GNU C Library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- see <http://www.gnu.org/licenses/>. */
-
-/* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
-
- * crti.s puts a function prologue at the beginning of the
- .init and .fini sections and defines global symbols for
- those addresses, so they can be called as functions.
-
- * crtn.s puts the corresponding function epilogues
- in the .init and .fini sections. */
-
-#include <stdlib.h>
-
-/* We use embedded asm for .section unconditionally, as this makes it
- easier to insert the necessary directives into crtn.S. */
-#define SECTION(x) __asm__ (".section " x )
-
-/* Embed an #include to pull in the alignment and .end directives. */
-__asm__ ("\n#include \"defs.h\"");
-__asm__ ("\n#if defined __i686 && defined __ASSEMBLER__");
-__asm__ ("\n#undef __i686");
-__asm__ ("\n#define __i686 __i686");
-__asm__ ("\n#endif");
-
-/* The initial common code ends here. */
-__asm__ ("\n/*@HEADER_ENDS*/");
-
-/* To determine whether we need .end and .align: */
-__asm__ ("\n/*@TESTS_BEGIN*/");
-extern void dummy (void (*foo) (void));
-void
-dummy (void (*foo) (void))
-{
- if (foo)
- (*foo) ();
-}
-__asm__ ("\n/*@TESTS_END*/");
-
-/* The beginning of _init: */
-__asm__ ("\n/*@_init_PROLOG_BEGINS*/");
-
-static void
-call_initialize_minimal (void)
-{
- extern void __pthread_initialize_minimal_internal (void)
- __attribute ((visibility ("hidden")));
-
- __pthread_initialize_minimal_internal ();
-}
-
-SECTION (".init");
-extern void __attribute__ ((section (".init"))) _init (void);
-void
-_init (void)
-{
- /* The very first thing we must do is to set up the registers. */
- call_initialize_minimal ();
-
- __asm__ ("ALIGN");
- __asm__("END_INIT");
- /* Now the epilog. */
- __asm__ ("\n/*@_init_PROLOG_ENDS*/");
- __asm__ ("\n/*@_init_EPILOG_BEGINS*/");
- SECTION(".init");
-}
-__asm__ ("END_INIT");
-
-/* End of the _init epilog, beginning of the _fini prolog. */
-__asm__ ("\n/*@_init_EPILOG_ENDS*/");
-__asm__ ("\n/*@_fini_PROLOG_BEGINS*/");
-
-SECTION (".fini");
-extern void __attribute__ ((section (".fini"))) _fini (void);
-void
-_fini (void)
-{
-
- /* End of the _fini prolog. */
- __asm__ ("ALIGN");
- __asm__ ("END_FINI");
- __asm__ ("\n/*@_fini_PROLOG_ENDS*/");
-
- /* Xtensa: It doesn't really matter whether GCC thinks this is a leaf
- function or not, and the scripts that are supposed to remove the
- call don't catch the literal, resulting in an undefined symbol
- reference. */
-#if 0
- {
- /* Let GCC know that _fini is not a leaf function by having a dummy
- function call here. We arrange for this call to be omitted from
- either crt file. */
- extern void i_am_not_a_leaf (void);
- i_am_not_a_leaf ();
- }
-#endif
-
- /* Beginning of the _fini epilog. */
- __asm__ ("\n/*@_fini_EPILOG_BEGINS*/");
- SECTION (".fini");
-}
-__asm__ ("END_FINI");
-
-/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
- is shared between both crt files. */
-__asm__ ("\n/*@_fini_EPILOG_ENDS*/");
-__asm__ ("\n/*@TRAILER_BEGINS*/");
-
-/* End of file. */
diff --git a/libpthread/nptl/sysdeps/xtensa/Makefile.arch b/libpthread/nptl/sysdeps/xtensa/Makefile.arch
index 2c1fc1b..9e63b19 100644
--- a/libpthread/nptl/sysdeps/xtensa/Makefile.arch
+++ b/libpthread/nptl/sysdeps/xtensa/Makefile.arch
@@ -18,9 +18,6 @@
ASFLAGS-dl-tlsdesc.S = -DNOT_IN_libc=1
ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-nptl-sysdep.S = -DNOT_IN_libc -DIS_IN_libpthread \
- -D_LIBC_REENTRANT \
- -I$(top_srcdir)libc/sysdeps/linux/xtensa
libc_arch_a_CSRC = libc-tls.c
librt_arch_a_SSRC = dl-tlsdesc.S