Only the placeholder compatibility symbols are left now.
The __errno_location symbol was removed (moved) using
scripts/move-symbol-to-libc.py.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
shared-only-routines = forward
static-only-routines = pthread_atfork
-libpthread-routines = \
- libpthread-compat \
- nptl-init \
- pt-interp \
- version \
-
-libpthread-shared-only-routines = \
- pt-allocrtsig \
- pt-interp \
- version \
+libpthread-routines = libpthread-compat
+libpthread-shared-only-routines = libpthread-compat
# Since cancellation handling is in large parts handled using exceptions
# we have to compile some files with exception handling enabled, some
tests-printers-libs := $(static-thread-library)
endif
-LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
+LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete
tests += tst-cancelx7 tst-cancelx17
echo "multidir := $$dir" > $@T
mv -f $@T $@
-crti-objs := crti.o
-crtn-objs := crtn.o
-ifneq (,$(patsubst .,,$(multidir)))
-generated-dirs += $(firstword $(subst /, , $(multidir)))
-crti-objs += $(multidir)/crti.o
-crtn-objs += $(multidir)/crtn.o
-$(objpfx)$(multidir):
- mkdir -p $@
-endif
-extra-objs += $(crti-objs) $(crtn-objs)
-extra-objs += pt-crti.o
endif
CFLAGS-ftrylockfile.c += $(libio-mtsafe)
LDLIBS-tst-cancel24 = -Wl,--no-as-needed -lstdc++
LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24)
-extra-B-pthread.so = -B$(common-objpfx)nptl/
-$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
-$(objpfx)libpthread.so: +preinit += $(addprefix $(objpfx),$(crti-objs))
-$(objpfx)libpthread.so: +postinit += $(addprefix $(objpfx),$(crtn-objs))
-
# Make sure we link with the thread library.
ifeq ($(build-shared),yes)
$(addprefix $(objpfx), \
endif
ifeq ($(build-shared),yes)
-$(objpfx)crti.o: $(objpfx)pt-crti.o
- ln -f $< $@
-
-ifneq ($(multidir),.)
-$(objpfx)$(multidir)/crti.o: $(objpfx)crti.o $(objpfx)$(multidir)/
- ln -f $< $@
-
-$(objpfx)$(multidir)/crtn.o: $(objpfx)crtn.o $(objpfx)$(multidir)/
- ln -f $< $@
-endif
-
generated += multidir.mk tst-tls6.out
-
-# Give libpthread.so an entry point and make it directly runnable itself.
-LDFLAGS-pthread.so += -e __nptl_main
-# pt-interp.c exists just to get the runtime linker path into libpthread.so.
-$(objpfx)pt-interp.os: $(common-objpfx)runtime-linker.h
endif
tst-exec4-ARGS = $(host-test-program-cmd)
libpthread {
GLIBC_2.0 {
- _Exit;
- _IO_flockfile;
- _IO_ftrylockfile;
- _IO_funlockfile;
- __errno_location;
- _exit;
- flockfile;
- ftrylockfile;
- funlockfile;
- pthread_create;
- pthread_sigmask;
+ __libpthread_version_placeholder;
}
GLIBC_2.1 {
}
#endif
+#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+ __libpthread_version_placeholder, GLIBC_2_0);
+#endif
+
#if (SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_2))
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_1);
__libpthread_version_placeholder, GLIBC_2_1_2);
#endif
-#if SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_2_3) \
+#if SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_3) \
&& ABI_libpthread_GLIBC_2_2 != ABI_libpthread_GLIBC_2_0
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_2);
__libpthread_version_placeholder, GLIBC_2_12);
#endif
-#if SHLIB_COMPAT (libpthread, GLIBC_2_18, GLIBC_2_19) \
- && ABI_libpthread_GLIBC_2_18 != ABI_libpthread_GLIBC_2_0
+#if SHLIB_COMPAT (libpthread, GLIBC_2_18, GLIBC_2_19)
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_18);
#endif
+++ /dev/null
-/* Copyright (C) 2002-2021 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
- <https://www.gnu.org/licenses/>. */
-
-#include <assert.h>
-#include <errno.h>
-#include <limits.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/resource.h>
-#include <pthreadP.h>
-#include <atomic.h>
-#include <ldsodefs.h>
-#include <tls.h>
-#include <list.h>
-#include <version.h>
-#include <shlib-compat.h>
-#include <lowlevellock.h>
-#include <futex-internal.h>
-#include <kernel-features.h>
-#include <libc-pointer-arith.h>
-#include <pthread_mutex_conf.h>
-#include <nptl-stack.h>
-
-void
-__pthread_initialize_minimal_internal (void)
-{
-}
-strong_alias (__pthread_initialize_minimal_internal,
- __pthread_initialize_minimal)
+++ /dev/null
-/* Special .init and .fini section support for libpthread.
- Copyright (C) 2012-2021 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.
-
- 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 GNU Lesser 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.)
-
- Note that people who make modified versions of this file are not
- obligated to grant this special exception for their modified
- versions; it is their choice whether to do so. The GNU Lesser
- General Public License gives permission to release a modified
- version without this exception; this exception also makes it
- possible to release a modified version which carries forward this
- exception.
-
- 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
- <https://www.gnu.org/licenses/>. */
-
-#include <elf-initfini.h>
-
-/* Arrange for __pthread_initialize_minimal_internal to be called at
- libpthread startup, instead of conditionally calling
- __gmon_start__. */
-
-#if ELF_INITFINI
-# define PREINIT_FUNCTION __pthread_initialize_minimal_internal
-# define PREINIT_FUNCTION_WEAK 0
-
-# include <crti.S>
-#else
- .section .init_array,"a",%init_array
- .dc.a __pthread_initialize_minimal_internal
-#endif
+++ /dev/null
-#include <elf/interp.c>
+++ /dev/null
-/* Entry point for libpthread DSO.
- Copyright (C) 2002-2021 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
- <https://www.gnu.org/licenses/>. */
-
-#include <unistd.h>
-#include <sysdep.h>
-
-
-static const char banner[] =
-"Native POSIX Threads Library\n\
-Copyright (C) 2021 Free Software Foundation, Inc.\n\
-This is free software; see the source for copying conditions.\n\
-There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
-PARTICULAR PURPOSE.\n"
-"Forced unwind support included.\n"
-;
-
-
-/* This is made the e_entry of libpthread.so by LDFLAGS-pthread.so. */
-__attribute__ ((noreturn))
-void
-__nptl_main (void)
-{
- write (STDOUT_FILENO, banner, sizeof banner - 1);
- _exit (0);
-}
+++ /dev/null
-#include <aeabi_unwind_cpp_pr1.c>
endif
ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += nptl-aeabi_unwind_cpp_pr1
-libpthread-shared-only-routines += nptl-aeabi_unwind_cpp_pr1
-
# This test relies on compiling part of the binary with EH information,
# part without, and unwinding through. The .ARM.exidx tables have
# start addresses for EH regions, but no end addresses. Every
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-ifeq ($(subdir),nptl)
-libpthread-routines += sysdep
-libpthread-shared-only-routines += sysdep
-endif
CPPFLAGS-crtn.S += $(pic-ccflag)
endif
-ifeq ($(subdir),nptl)
-CPPFLAGS-pt-crti.S += $(pic-ccflag)
-CPPFLAGS-crtn.S += $(pic-ccflag)
-endif
-
ASFLAGS-.os += $(pic-ccflag)
# libc.a and libc_p.a must be compiled with -fPIE/-fpie for static PIE.
ASFLAGS-.o += $(pie-default)
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += nptl-sysdep
-libpthread-shared-only-routines += nptl-sysdep
-endif
+++ /dev/null
-/* Pull in __syscall_error. */
-#include <sysdep.S>
# License along with the GNU C Library; if not, see
# <https://www.gnu.org/licenses/>.
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += errno-loc
-endif
-
ifeq ($(subdir),rt)
librt-sysdep_routines += timer_routines
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += nptl-sysdep
-libpthread-shared-only-routines += nptl-sysdep
-endif
+++ /dev/null
-/* Pull in __syscall_error. */
-#include <sysdep.S>
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-ifeq ($(subdir),nptl)
-libpthread-routines += sysdep
-libpthread-shared-only-routines += sysdep
-endif
routines += cpu_relax
endif
-ifeq ($(subdir), nptl)
-libpthread-routines += cpu_relax
-endif
-
# The assembler on SPARC needs the -fPIC flag even when it's assembler code.
ASFLAGS-.os += -fPIC
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-ifeq ($(subdir),nptl)
-CPPFLAGS-pt-crti.S += -fPIC
-CPPFLAGS-crtn.S += -fPIC
-endif
-GLIBC_2.17 __errno_location F
+GLIBC_2.17 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
libm-routines += multc3 divtc3
endif # math
-ifeq ($(subdir),nptl)
-# pull in __syscall_error routine, sigaction stubs.
-libpthread-routines += sysdep rt_sigaction
-libpthread-shared-only-routines += sysdep rt_sigaction
-endif
-
ifeq ($(subdir),conform)
# For bug 21260.
conformtest-xfail-conds += alpha-linux
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.1 __libpthread_version_placeholder F
GLIBC_2.1.1 __libpthread_version_placeholder F
GLIBC_2.1.2 __libpthread_version_placeholder F
-GLIBC_2.32 __errno_location F
+GLIBC_2.32 __libpthread_version_placeholder F
librt-shared-only-routines += libc-do-syscall
endif
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += libc-do-syscall
-libpthread-shared-only-routines += libc-do-syscall
-endif
-
ifeq ($(subdir),resolv)
libanl-sysdep_routines += libc-do-syscall
libanl-shared-only-routines += libc-do-syscall
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
-GLIBC_2.4 __errno_location F
GLIBC_2.4 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
-GLIBC_2.4 __errno_location F
GLIBC_2.4 __libpthread_version_placeholder F
-GLIBC_2.29 __errno_location F
+GLIBC_2.29 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.2 __errno_location F
+GLIBC_2.2 __libpthread_version_placeholder F
GLIBC_2.2.3 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
sysdep_routines += libc-do-syscall
endif
-ifeq ($(subdir),nptl)
-libpthread-sysdep_routines += libc-do-syscall
-libpthread-shared-only-routines += libc-do-syscall
-endif
-
ifeq ($(subdir),stdlib)
gen-as-const-headers += ucontext_i.sym
endif
endif
endif
-ifeq ($(subdir),nptl)
-# pull in __syscall_error routine
-libpthread-routines += sysdep
-libpthread-shared-only-routines += sysdep
-endif
-
ifeq ($(subdir),rt)
# pull in __syscall_error routine
librt-routines += sysdep
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.1 __libpthread_version_placeholder F
GLIBC_2.1.1 __libpthread_version_placeholder F
GLIBC_2.1.2 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.2 __errno_location F
+GLIBC_2.2 __libpthread_version_placeholder F
GLIBC_2.2.3 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
-GLIBC_2.4 __errno_location F
GLIBC_2.4 __libpthread_version_placeholder F
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.1 __libpthread_version_placeholder F
GLIBC_2.1.1 __libpthread_version_placeholder F
GLIBC_2.1.2 __libpthread_version_placeholder F
ifeq ($(subdir),resource)
sysdep_routines += backtrace_linux
endif
-
-ifeq ($(subdir),nptl)
-# pull in __syscall_error routine
-libpthread-routines += sysdep
-libpthread-shared-only-routines += sysdep
-endif
-GLIBC_2.18 __errno_location F
+GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
-GLIBC_2.18 __errno_location F
+GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.21 __errno_location F
+GLIBC_2.21 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
tests += test-gettimebasefreq
tests += test-powerpc-linux-sysconf
endif
-
-ifeq ($(subdir),nptl)
-libpthread-routines += sysdep
-libpthread-shared-only-routines += sysdep
-endif
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.1 __libpthread_version_placeholder F
GLIBC_2.1.1 __libpthread_version_placeholder F
GLIBC_2.1.2 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
-GLIBC_2.3 __errno_location F
+GLIBC_2.3 __libpthread_version_placeholder F
GLIBC_2.3.2 __libpthread_version_placeholder F
GLIBC_2.3.3 __libpthread_version_placeholder F
GLIBC_2.3.4 __libpthread_version_placeholder F
-GLIBC_2.17 __errno_location F
+GLIBC_2.17 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
-GLIBC_2.33 __errno_location F
+GLIBC_2.33 __libpthread_version_placeholder F
-GLIBC_2.27 __errno_location F
+GLIBC_2.27 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F
GLIBC_2.31 __libpthread_version_placeholder F
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.1 __libpthread_version_placeholder F
GLIBC_2.1.1 __libpthread_version_placeholder F
GLIBC_2.1.2 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.19 __libpthread_version_placeholder F
-GLIBC_2.2 __errno_location F
+GLIBC_2.2 __libpthread_version_placeholder F
GLIBC_2.2.3 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.2 __errno_location F
+GLIBC_2.2 __libpthread_version_placeholder F
GLIBC_2.2.3 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.2 __errno_location F
+GLIBC_2.2 __libpthread_version_placeholder F
GLIBC_2.2.3 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
ifeq ($(subdir),signal)
sysdep_routines += sigreturn_stub
endif
-
-ifeq ($(subdir),nptl)
-# pull in __syscall_error routine
-libpthread-routines += sysdep sigreturn_stub
-libpthread-shared-only-routines += sysdep sigreturn_stub
-endif
-GLIBC_2.0 __errno_location F
+GLIBC_2.0 __libpthread_version_placeholder F
GLIBC_2.1 __libpthread_version_placeholder F
GLIBC_2.1.1 __libpthread_version_placeholder F
GLIBC_2.1.2 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.2 __errno_location F
+GLIBC_2.2 __libpthread_version_placeholder F
GLIBC_2.2.3 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.11 __libpthread_version_placeholder F
GLIBC_2.12 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
-GLIBC_2.2.5 __errno_location F
+GLIBC_2.2.5 __libpthread_version_placeholder F
GLIBC_2.2.6 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.3.2 __libpthread_version_placeholder F
-GLIBC_2.16 __errno_location F
+GLIBC_2.16 __libpthread_version_placeholder F
GLIBC_2.18 __libpthread_version_placeholder F
GLIBC_2.28 __libpthread_version_placeholder F
GLIBC_2.30 __libpthread_version_placeholder F