From patchwork Fri Dec 4 12:52:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 41302 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E6E03973047; Fri, 4 Dec 2020 12:52:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E6E03973047 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1607086357; bh=Gq3JqtCpLWLZj6EYxcMpgs62+8CCWKPFggBEgfjv7PA=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=e+MgefknsrBxNObsQAsex29ba5m0kMW+aJW38hSr37Em3n0onLo6jfDnlI4fZ0sM6 ZEsIvuJNM2OTaPxRqDUQdMLKa3jqncrvcEOLp4FAd9n10MHwPxJu4ZRymbPVbxJsZF HMKDBum4kAmjqNlI26Wn3omqidP4tfZVHw3o7AUU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 52F523973045 for ; Fri, 4 Dec 2020 12:52:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 52F523973045 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-353-d01ASXPUM1G7PlKfjBRjdw-1; Fri, 04 Dec 2020 07:52:28 -0500 X-MC-Unique: d01ASXPUM1G7PlKfjBRjdw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AB243802B46 for ; Fri, 4 Dec 2020 12:52:27 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-44.ams2.redhat.com [10.36.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98C8327C5B for ; Fri, 4 Dec 2020 12:52:26 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v3 3/3] elf: Rework exception handling in the dynamic loader [BZ #25486] In-Reply-To: <5472b914e28766d11f2622f34b328088792cf550.1607085588.git.fweimer@redhat.com> References: <5472b914e28766d11f2622f34b328088792cf550.1607085588.git.fweimer@redhat.com> Message-Id: <05e1b5b43416eba58f2bab968320fa3d38e33479.1607085588.git.fweimer@redhat.com> Date: Fri, 04 Dec 2020 13:52:25 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The old exception handling implementation used function interposition to replace the dynamic loader implementation (no TLS support) with the libc implementation (TLS support). This results in problems if the link order between the dynamic loader and libc is reversed (bug 25486). The new implementation moves the entire implementation of the exception handling functions back into the dynamic loader, using THREAD_GETMEM and THREAD_SETMEM for thread-local data support. These depends on Hurd support for these macros, added in commit b65a82e4e757c1e6cb7073916 ("hurd: Add THREAD_GET/SETMEM/_NC"). One small obstacle is that the exception handling facilities are used before the TCB has been set up, so a check is needed if the TCB is available. If not, a regular global variable is used to store the exception handling information. Also rename dl-error.c to dl-catch.c, to avoid confusion with the dlerror function. --- v3: Rebase to current master. Adjust to Hurd changes in symbol visibility management for ld.so. Also remove PLT expectations from the ARC ported (which has been included since the last posted version). elf/Makefile | 6 +- elf/Versions | 6 - elf/{dl-error-skeleton.c => dl-catch.c} | 139 +++++++++--------- elf/dl-error-minimal.c | 23 --- elf/dl-error.c | 27 ---- nptl/descr.h | 3 + sysdeps/generic/ldsodefs.h | 8 +- sysdeps/generic/localplt.data | 5 - sysdeps/mach/hurd/i386/localplt.data | 5 - sysdeps/mach/hurd/i386/tls.h | 3 + sysdeps/unix/sysv/linux/aarch64/localplt.data | 5 - sysdeps/unix/sysv/linux/alpha/localplt.data | 5 - sysdeps/unix/sysv/linux/arc/localplt.data | 5 - sysdeps/unix/sysv/linux/arm/localplt.data | 5 - sysdeps/unix/sysv/linux/csky/localplt.data | 5 - sysdeps/unix/sysv/linux/hppa/localplt.data | 5 - sysdeps/unix/sysv/linux/i386/localplt.data | 5 - sysdeps/unix/sysv/linux/ia64/localplt.data | 5 - .../sysv/linux/m68k/coldfire/localplt.data | 5 - .../unix/sysv/linux/m68k/m680x0/localplt.data | 5 - .../unix/sysv/linux/microblaze/localplt.data | 5 - sysdeps/unix/sysv/linux/nios2/localplt.data | 5 - .../linux/powerpc/powerpc32/fpu/localplt.data | 5 - .../powerpc/powerpc32/nofpu/localplt.data | 5 - .../linux/powerpc/powerpc64/localplt.data | 5 - sysdeps/unix/sysv/linux/riscv/localplt.data | 5 - sysdeps/unix/sysv/linux/s390/localplt.data | 5 - sysdeps/unix/sysv/linux/sh/localplt.data | 5 - .../sysv/linux/sparc/sparc32/localplt.data | 5 - .../sysv/linux/sparc/sparc64/localplt.data | 5 - sysdeps/x86_64/localplt.data | 5 - 31 files changed, 86 insertions(+), 244 deletions(-) rename elf/{dl-error-skeleton.c => dl-catch.c} (80%) delete mode 100644 elf/dl-error-minimal.c delete mode 100644 elf/dl-error.c diff --git a/elf/Makefile b/elf/Makefile index 09ff878d7a..733c97aa11 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -24,7 +24,7 @@ include ../Makeconfig headers = elf.h bits/elfclass.h link.h bits/link.h routines = $(all-dl-routines) dl-support dl-iteratephdr \ dl-addr dl-addr-obj enbl-secure dl-profstub \ - dl-origin dl-libc dl-sym dl-sysdep dl-error \ + dl-origin dl-libc dl-sym dl-sysdep \ dl-reloc-static-pie libc_early_init # The core dynamic linking functions are in libc for the static and @@ -35,7 +35,7 @@ dl-routines = $(addprefix dl-,load lookup object reloc deps \ execstack open close trampoline \ exception sort-maps lookup-direct \ call-libc-early-init write \ - thread_gscope_wait) + thread_gscope_wait catch) ifeq (yes,$(use-ldconfig)) dl-routines += dl-cache endif @@ -61,7 +61,7 @@ elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin \ # ld.so uses those routines, plus some special stuff for being the program # interpreter and operating independent of libc. rtld-routines = rtld $(all-dl-routines) dl-sysdep dl-environ dl-minimal \ - dl-error-minimal dl-conflict dl-hwcaps dl-hwcaps_split dl-hwcaps-subdirs \ + dl-conflict dl-hwcaps dl-hwcaps_split dl-hwcaps-subdirs \ dl-usage all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines) diff --git a/elf/Versions b/elf/Versions index be88c48e6d..e14eecbdc5 100644 --- a/elf/Versions +++ b/elf/Versions @@ -27,10 +27,6 @@ libc { _dl_sym; _dl_vsym; __libc_dlclose; __libc_dlopen_mode; __libc_dlsym; __libc_dlvsym; __libc_early_init; - - # Internal error handling support. Interposes the functions in ld.so. - _dl_signal_exception; _dl_catch_exception; - _dl_signal_error; _dl_catch_error; } } @@ -69,8 +65,6 @@ ld { # Internal error handling support. _dl_exception_create; _dl_exception_create_format; _dl_exception_free; - - # Internal error handling support. Interposed by libc.so. _dl_signal_exception; _dl_catch_exception; _dl_signal_error; _dl_catch_error; diff --git a/elf/dl-error-skeleton.c b/elf/dl-catch.c similarity index 80% rename from elf/dl-error-skeleton.c rename to elf/dl-catch.c index c505c02adf..fe88a2a70e 100644 --- a/elf/dl-error-skeleton.c +++ b/elf/dl-catch.c @@ -1,4 +1,4 @@ -/* Template for error handling for runtime dynamic linker. +/* Exception handling in the dynamic linker. Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -16,16 +16,6 @@ License along with the GNU C Library; if not, see . */ -/* The following macro needs to be defined before including this - skeleton file: - - DL_ERROR_BOOTSTRAP - - If 1, do not use TLS and implement _dl_signal_cerror and - _dl_receive_error. If 0, TLS is used, and the variants with - error callbacks are not provided. */ - - #include #include #include @@ -34,39 +24,50 @@ #include #include #include +#include /* This structure communicates state between _dl_catch_error and _dl_signal_error. */ -struct catch +struct rtld_catch { struct dl_exception *exception; /* The exception data is stored there. */ volatile int *errcode; /* Return value of _dl_signal_error. */ jmp_buf env; /* longjmp here on error. */ }; -/* Multiple threads at once can use the `_dl_catch_error' function. The - calls can come from `_dl_map_object_deps', `_dlerror_run', or from - any of the libc functionality which loads dynamic objects (NSS, iconv). - Therefore we have to be prepared to save the state in thread-local - memory. */ -#if !DL_ERROR_BOOTSTRAP -static __thread struct catch *catch_hook attribute_tls_model_ie; -#else -/* The version of this code in ld.so cannot use thread-local variables - and is used during bootstrap only. */ -static struct catch *catch_hook; +/* Multiple threads at once can use the `_dl_catch_error' function. + The calls can come from `_dl_map_object_deps', `_dlerror_run', or + from any of the libc functionality which loads dynamic objects + (NSS, iconv). Therefore we have to be prepared to save the state + in thread-local memory. We use THREAD_GETMEM and THREAD_SETMEM + instead of ELF TLS because it exception handling must work before + the TCB and ELF TLS have been set up. */ + +#if IS_IN (rtld) +static struct rtld_catch *rtld_catch_notls; #endif -#if DL_ERROR_BOOTSTRAP -/* This points to a function which is called when an continuable error is - received. Unlike the handling of `catch' this function may return. - The arguments will be the `errstring' and `objname'. +static struct rtld_catch * +get_catch (void) +{ +#if IS_IN (rtld) + if (!__rtld_tls_init_tp_called) + return rtld_catch_notls; + else +#endif + return THREAD_GETMEM (THREAD_SELF, rtld_catch); +} - Since this functionality is not used in normal programs (only in ld.so) - we do not care about multi-threaded programs here. We keep this as a - global variable. */ -static receiver_fct receiver; -#endif /* DL_ERROR_BOOTSTRAP */ +static void +set_catch (struct rtld_catch *catch) +{ +#if IS_IN (rtld) + if (!__rtld_tls_init_tp_called) + rtld_catch_notls = catch; + else +#endif + THREAD_SETMEM (THREAD_SELF, rtld_catch, catch); +} /* Lossage while resolving the program's own symbols is always fatal. */ static void @@ -89,7 +90,7 @@ void _dl_signal_exception (int errcode, struct dl_exception *exception, const char *occasion) { - struct catch *lcatch = catch_hook; + struct rtld_catch *lcatch = get_catch (); if (lcatch != NULL) { *lcatch->exception = *exception; @@ -101,13 +102,13 @@ _dl_signal_exception (int errcode, struct dl_exception *exception, else fatal_error (errcode, exception->objname, occasion, exception->errstring); } -libc_hidden_def (_dl_signal_exception) +rtld_hidden_def (_dl_signal_exception) void _dl_signal_error (int errcode, const char *objname, const char *occation, const char *errstring) { - struct catch *lcatch = catch_hook; + struct rtld_catch *lcatch = get_catch (); if (! errstring) errstring = N_("DYNAMIC LINKER BUG!!!"); @@ -123,10 +124,18 @@ _dl_signal_error (int errcode, const char *objname, const char *occation, else fatal_error (errcode, objname, occation, errstring); } -libc_hidden_def (_dl_signal_error) +rtld_hidden_def (_dl_signal_error) +#if IS_IN (rtld) +/* This points to a function which is called when an continuable error is + received. Unlike the handling of `catch' this function may return. + The arguments will be the `errstring' and `objname'. + + Since this functionality is not used in normal programs (only in ld.so) + we do not care about multi-threaded programs here. We keep this as a + global variable. */ +static receiver_fct receiver; -#if DL_ERROR_BOOTSTRAP void _dl_signal_cexception (int errcode, struct dl_exception *exception, const char *occasion) @@ -167,7 +176,23 @@ _dl_signal_cerror (int errcode, const char *objname, const char *occation, else _dl_signal_error (errcode, objname, occation, errstring); } -#endif /* DL_ERROR_BOOTSTRAP */ + +void +_dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args) +{ + struct rtld_catch *old_catch = get_catch (); + receiver_fct old_receiver = receiver; + + /* Set the new values. */ + set_catch (NULL); + receiver = fct; + + (*operate) (args); + + set_catch (old_catch); + receiver = old_receiver; +} +#endif int _dl_catch_exception (struct dl_exception *exception, @@ -177,11 +202,11 @@ _dl_catch_exception (struct dl_exception *exception, Exceptions during operate (args) are fatal. */ if (exception == NULL) { - struct catch *const old = catch_hook; - catch_hook = NULL; + struct rtld_catch *old_catch = get_catch (); + set_catch (NULL); operate (args); /* If we get here, the operation was successful. */ - catch_hook = old; + set_catch (old_catch); return 0; } @@ -194,19 +219,19 @@ _dl_catch_exception (struct dl_exception *exception, in _dl_signal_error (before longjmp). */ volatile int errcode; - struct catch c; + struct rtld_catch c; /* Don't use an initializer since we don't need to clear C.env. */ c.exception = exception; c.errcode = &errcode; - struct catch *const old = catch_hook; - catch_hook = &c; + struct rtld_catch *old = get_catch (); + set_catch (&c); /* Do not save the signal mask. */ if (__builtin_expect (__sigsetjmp (c.env, 0), 0) == 0) { (*operate) (args); - catch_hook = old; + set_catch (old); *exception = (struct dl_exception) { NULL }; return 0; } @@ -214,10 +239,10 @@ _dl_catch_exception (struct dl_exception *exception, /* We get here only if we longjmp'd out of OPERATE. _dl_signal_exception has already stored values into *EXCEPTION. */ - catch_hook = old; + set_catch (old); return errcode; } -libc_hidden_def (_dl_catch_exception) +rtld_hidden_def (_dl_catch_exception) int _dl_catch_error (const char **objname, const char **errstring, @@ -230,22 +255,4 @@ _dl_catch_error (const char **objname, const char **errstring, *mallocedp = exception.message_buffer == exception.errstring; return errorcode; } -libc_hidden_def (_dl_catch_error) - -#if DL_ERROR_BOOTSTRAP -void -_dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args) -{ - struct catch *old_catch = catch_hook; - receiver_fct old_receiver = receiver; - - /* Set the new values. */ - catch_hook = NULL; - receiver = fct; - - (*operate) (args); - - catch_hook = old_catch; - receiver = old_receiver; -} -#endif /* DL_ERROR_BOOTSTRAP */ +rtld_hidden_def (_dl_catch_error) diff --git a/elf/dl-error-minimal.c b/elf/dl-error-minimal.c deleted file mode 100644 index d5e83198ce..0000000000 --- a/elf/dl-error-minimal.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Error handling for runtime dynamic linker, minimal version. - Copyright (C) 1995-2020 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 - . */ - -/* This version does lives in ld.so, does not use thread-local data - and supports _dl_signal_cerror and _dl_receive_error. */ - -#define DL_ERROR_BOOTSTRAP 1 -#include "dl-error-skeleton.c" diff --git a/elf/dl-error.c b/elf/dl-error.c deleted file mode 100644 index e91561b785..0000000000 --- a/elf/dl-error.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Error handling for runtime dynamic linker, full version. - Copyright (C) 1995-2020 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 - . */ - -/* This implementation lives in libc.so because it uses thread-local - data, which is not available in ld.so. It interposes the version - in dl-error-minimal.c after ld.so bootstrap. - - The signal/catch mechanism is used by the audit framework, which - means that even in ld.so, not all errors are fatal. */ - -#define DL_ERROR_BOOTSTRAP 0 -#include "dl-error-skeleton.c" diff --git a/nptl/descr.h b/nptl/descr.h index b172ee408b..73511e8515 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -403,6 +403,9 @@ struct pthread masked.) */ sigset_t sigmask; + /* Used by the exception handling implementation in the dynamic loader. */ + struct rtld_catch *rtld_catch; + /* Indicates whether is a C11 thread created by thrd_creat. */ bool c11; diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index caaf935e46..b240f7fb16 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -832,13 +832,13 @@ rtld_hidden_proto (_dl_exception_free) void _dl_signal_exception (int errcode, struct dl_exception *, const char *occasion) __attribute__ ((__noreturn__)); -libc_hidden_proto (_dl_signal_exception) +rtld_hidden_proto (_dl_signal_exception) /* Like _dl_signal_exception, but creates the exception first. */ extern void _dl_signal_error (int errcode, const char *object, const char *occasion, const char *errstring) __attribute__ ((__noreturn__)); -libc_hidden_proto (_dl_signal_error) +rtld_hidden_proto (_dl_signal_error) /* Like _dl_signal_exception, but may return when called in the context of _dl_receive_error. This is only used during ld.so @@ -891,7 +891,7 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *), extern int _dl_catch_error (const char **objname, const char **errstring, bool *mallocedp, void (*operate) (void *), void *args); -libc_hidden_proto (_dl_catch_error) +rtld_hidden_proto (_dl_catch_error) /* Call OPERATE (ARGS). If no error occurs, set *EXCEPTION to zero. Otherwise, store a copy of the raised exception in *EXCEPTION, @@ -900,7 +900,7 @@ libc_hidden_proto (_dl_catch_error) disabled (so that exceptions are fatal). */ int _dl_catch_exception (struct dl_exception *exception, void (*operate) (void *), void *args); -libc_hidden_proto (_dl_catch_exception) +rtld_hidden_proto (_dl_catch_exception) /* Open the shared object NAME and map in its segments. LOADER's DT_RPATH is used in searching for NAME. diff --git a/sysdeps/generic/localplt.data b/sysdeps/generic/localplt.data index e2083c0ce6..d2965199f3 100644 --- a/sysdeps/generic/localplt.data +++ b/sysdeps/generic/localplt.data @@ -7,8 +7,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/mach/hurd/i386/localplt.data b/sysdeps/mach/hurd/i386/localplt.data index 94064ecbc5..378ce95210 100644 --- a/sysdeps/mach/hurd/i386/localplt.data +++ b/sysdeps/mach/hurd/i386/localplt.data @@ -9,11 +9,6 @@ libc.so: malloc + REL R_386_GLOB_DAT libc.so: memalign + REL R_386_GLOB_DAT libc.so: realloc + REL R_386_GLOB_DAT libm.so: matherr + REL R_386_GLOB_DAT -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error + REL R_386_GLOB_DAT -ld.so: _dl_catch_error + REL R_386_GLOB_DAT -ld.so: _dl_signal_exception + REL R_386_GLOB_DAT -ld.so: _dl_catch_exception + REL R_386_GLOB_DAT # The dynamic linker has its own versions of basic functions for initial loading # of shared libraries. These need to be overriden by libc once loaded. ld.so: __open ? diff --git a/sysdeps/mach/hurd/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h index 97d0b1cbab..928285feaf 100644 --- a/sysdeps/mach/hurd/i386/tls.h +++ b/sysdeps/mach/hurd/i386/tls.h @@ -48,6 +48,9 @@ typedef struct compatible with the i386 Linux version. */ mach_port_t reply_port; /* This thread's reply port. */ struct hurd_sigstate *_hurd_sigstate; + + /* Used by the exception handling implementation in the dynamic loader. */ + struct rtld_catch *rtld_catch; } tcbhead_t; #endif diff --git a/sysdeps/unix/sysv/linux/aarch64/localplt.data b/sysdeps/unix/sysv/linux/aarch64/localplt.data index 2c14b652ef..6d700a6bfc 100644 --- a/sysdeps/unix/sysv/linux/aarch64/localplt.data +++ b/sysdeps/unix/sysv/linux/aarch64/localplt.data @@ -12,8 +12,3 @@ libm.so: matherr libc.so: __getauxval ? # The dynamic loader needs __tls_get_addr for TLS. ld.so: __tls_get_addr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/alpha/localplt.data b/sysdeps/unix/sysv/linux/alpha/localplt.data index 43f6fdaea1..fd460cbf79 100644 --- a/sysdeps/unix/sysv/linux/alpha/localplt.data +++ b/sysdeps/unix/sysv/linux/alpha/localplt.data @@ -26,8 +26,3 @@ libm.so: matherr + RELA R_ALPHA_GLOB_DAT libm.so: __atan2 # The dynamic loader needs __tls_get_addr for TLS. ld.so: __tls_get_addr ? -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error + RELA R_ALPHA_GLOB_DAT -ld.so: _dl_catch_error + RELA R_ALPHA_GLOB_DAT -ld.so: _dl_signal_exception + RELA R_ALPHA_GLOB_DAT -ld.so: _dl_catch_exception + RELA R_ALPHA_GLOB_DAT diff --git a/sysdeps/unix/sysv/linux/arc/localplt.data b/sysdeps/unix/sysv/linux/arc/localplt.data index 4479e8ee8a..17e13e5332 100644 --- a/sysdeps/unix/sysv/linux/arc/localplt.data +++ b/sysdeps/unix/sysv/linux/arc/localplt.data @@ -5,8 +5,3 @@ libc.so: calloc libc.so: free # At -Os, a struct assignment in libgcc-static pulls this in libc.so: memcpy ? -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/arm/localplt.data b/sysdeps/unix/sysv/linux/arm/localplt.data index 0c3af0c64e..ac80babd3e 100644 --- a/sysdeps/unix/sysv/linux/arm/localplt.data +++ b/sysdeps/unix/sysv/linux/arm/localplt.data @@ -8,8 +8,3 @@ libm.so: matherr libpthread.so: raise # The dynamic loader needs __tls_get_addr for TLS. ld.so: __tls_get_addr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/csky/localplt.data b/sysdeps/unix/sysv/linux/csky/localplt.data index 0ed8650b65..f086f89c18 100644 --- a/sysdeps/unix/sysv/linux/csky/localplt.data +++ b/sysdeps/unix/sysv/linux/csky/localplt.data @@ -6,8 +6,3 @@ libc.so: free libc.so: malloc libc.so: memalign libc.so: realloc -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/hppa/localplt.data b/sysdeps/unix/sysv/linux/hppa/localplt.data index 09893d4dcf..18f1540f66 100644 --- a/sysdeps/unix/sysv/linux/hppa/localplt.data +++ b/sysdeps/unix/sysv/linux/hppa/localplt.data @@ -10,8 +10,3 @@ libc.so: __sigsetjmp libc.so: _IO_funlockfile libc.so: __errno_location libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/i386/localplt.data b/sysdeps/unix/sysv/linux/i386/localplt.data index 5334875b4b..0971c25dbd 100644 --- a/sysdeps/unix/sysv/linux/i386/localplt.data +++ b/sysdeps/unix/sysv/linux/i386/localplt.data @@ -7,8 +7,3 @@ libc.so: malloc + REL R_386_GLOB_DAT libc.so: memalign + REL R_386_GLOB_DAT libc.so: realloc + REL R_386_GLOB_DAT libm.so: matherr + REL R_386_GLOB_DAT -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error + REL R_386_GLOB_DAT -ld.so: _dl_catch_error + REL R_386_GLOB_DAT -ld.so: _dl_signal_exception + REL R_386_GLOB_DAT -ld.so: _dl_catch_exception + REL R_386_GLOB_DAT diff --git a/sysdeps/unix/sysv/linux/ia64/localplt.data b/sysdeps/unix/sysv/linux/ia64/localplt.data index 1c566a503e..ba488163bb 100644 --- a/sysdeps/unix/sysv/linux/ia64/localplt.data +++ b/sysdeps/unix/sysv/linux/ia64/localplt.data @@ -6,8 +6,3 @@ libc.so: realloc libm.so: matherr libm.so: matherrf libm.so: matherrl -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/localplt.data b/sysdeps/unix/sysv/linux/m68k/coldfire/localplt.data index 3c5efb7204..1e362b39b6 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/localplt.data +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/localplt.data @@ -5,8 +5,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/localplt.data b/sysdeps/unix/sysv/linux/m68k/m680x0/localplt.data index 843f4e25f2..d266b8f74b 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/localplt.data +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/localplt.data @@ -6,8 +6,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/microblaze/localplt.data b/sysdeps/unix/sysv/linux/microblaze/localplt.data index 0e98d5251e..a4196d46b0 100644 --- a/sysdeps/unix/sysv/linux/microblaze/localplt.data +++ b/sysdeps/unix/sysv/linux/microblaze/localplt.data @@ -7,8 +7,3 @@ libc.so: realloc libm.so: matherr # The dynamic loader needs __tls_get_addr for TLS. ld.so: __tls_get_addr ? -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/nios2/localplt.data b/sysdeps/unix/sysv/linux/nios2/localplt.data index b37987c7c0..517cf0106d 100644 --- a/sysdeps/unix/sysv/linux/nios2/localplt.data +++ b/sysdeps/unix/sysv/linux/nios2/localplt.data @@ -28,8 +28,3 @@ libc.so: __eqdf2 libc.so: __extendsfdf2 libc.so: __floatundidf ? libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data index a02dd5cc24..8fb56b6086 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data @@ -5,8 +5,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data index d8072597b7..a4f0dbddec 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data @@ -36,8 +36,3 @@ libc.so: realloc libm.so: copysignl ? libm.so: fabsl libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data index bb498fbe3a..2219aa9048 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data @@ -4,8 +4,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/riscv/localplt.data b/sysdeps/unix/sysv/linux/riscv/localplt.data index 0a235592c3..86acb63569 100644 --- a/sysdeps/unix/sysv/linux/riscv/localplt.data +++ b/sysdeps/unix/sysv/linux/riscv/localplt.data @@ -7,8 +7,3 @@ libc.so: malloc libc.so: memalign libc.so: memset ? libc.so: realloc -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/s390/localplt.data b/sysdeps/unix/sysv/linux/s390/localplt.data index a02dd5cc24..8fb56b6086 100644 --- a/sysdeps/unix/sysv/linux/s390/localplt.data +++ b/sysdeps/unix/sysv/linux/s390/localplt.data @@ -5,8 +5,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/sh/localplt.data b/sysdeps/unix/sysv/linux/sh/localplt.data index 3225177c50..16cb1a2207 100644 --- a/sysdeps/unix/sysv/linux/sh/localplt.data +++ b/sysdeps/unix/sysv/linux/sh/localplt.data @@ -12,8 +12,3 @@ libc.so: __errno_location libm.so: matherr # Generated by the compiler because there is no trap insn pattern. libc.so: abort ? -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data index be51efd566..c17a3714f4 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data @@ -19,8 +19,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data index 809062d46c..b614213c4e 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data @@ -18,8 +18,3 @@ libc.so: malloc libc.so: memalign libc.so: realloc libm.so: matherr -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error -ld.so: _dl_catch_error -ld.so: _dl_signal_exception -ld.so: _dl_catch_exception diff --git a/sysdeps/x86_64/localplt.data b/sysdeps/x86_64/localplt.data index 8f41e92870..950410fc30 100644 --- a/sysdeps/x86_64/localplt.data +++ b/sysdeps/x86_64/localplt.data @@ -9,8 +9,3 @@ libc.so: malloc + RELA R_X86_64_GLOB_DAT libc.so: memalign + RELA R_X86_64_GLOB_DAT libc.so: realloc + RELA R_X86_64_GLOB_DAT libm.so: matherr + RELA R_X86_64_GLOB_DAT -# The TLS-enabled version of these functions is interposed from libc.so. -ld.so: _dl_signal_error + RELA R_X86_64_GLOB_DAT -ld.so: _dl_catch_error + RELA R_X86_64_GLOB_DAT -ld.so: _dl_signal_exception + RELA R_X86_64_GLOB_DAT -ld.so: _dl_catch_exception + RELA R_X86_64_GLOB_DAT