From patchwork Fri Jun 14 15:28:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 166829 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2200785ilk; Fri, 14 Jun 2019 08:29:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnDLpRU0zOQ+HhspoHsszKkyOwwwM1NyOCA2/NihW8pssJSnScTeHhlsZMBOJb2oJgISyQ X-Received: by 2002:a17:902:9041:: with SMTP id w1mr80666934plz.132.1560526170839; Fri, 14 Jun 2019 08:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560526170; cv=none; d=google.com; s=arc-20160816; b=VOKnwKyMkxK26le3B7/PskztsCk+9+NjFUxvNcC2+5w0a7BFZgReuLVDGuAxgOsUko P7taplKKFzQ1FCHym0LihFd0SEHravz3FiO/8ZJzw+yuwe/FPxYFyDnx16+AdyHH2Vbl GkcySiqcuQ5yPPtNyGxIvtU9p5XQJPizh4qDluMULJBn9WTUFTMVI4UeY4kWHPFGOs2t Dm3kXtxhWzI6I0mT8kyxENpHGjRViKIQ6utES//hLxw4OWpy4LqCM/nqnAQM+zfjBZhh szz5D73K9+oV2NS7Mo9sElfM4ePHw8Qva7wxj+P8xCaBXEu8p4OFloo4wxPujq+8lqt+ NG7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:dkim-signature:delivered-to:sender :list-help:list-post:list-archive:list-subscribe:list-unsubscribe :list-id:precedence:mailing-list:dkim-signature:domainkey-signature; bh=sh4Lsz/b9fl0xLWtmr7mGV/rN3cFaoERP3ybQ5K1W1c=; b=IDNMA7AZ6Tl3aX+My9A+q51bAijb8BmV962+X7q/j+W4gxOWyFWdt+Lp7EX2Lkzlnt CokX5Xkn2V+e1UNC1fxjdA2PEknxFyTUS9cAYZYh0egxKvkKMn+omlHCyS6Ca6ds6ItO 28m+YCjGf9V5W2LzFvzyzOqfx+9zIwacU1cLcswmEwJZ1EsJAcndw7hKAyzviyK7yCDw mbMQlgvz/QahP+Yx4SD9k0KXrYrtB7XqkY4FtDlcckFjMEmRXpfDAcoelUJPExEDUjjf bmXC52wcVLkmIF9qd6tQDUeIp5GYTK7bqWuhvFDhL+c1jiKRduVTqDkKpKNsCgszBcjX RTaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Fic3FYgv; dkim=pass header.i=@linaro.org header.s=google header.b=SqpwBqlT; spf=pass (google.com: domain of libc-alpha-return-102735-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102735-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d5si2705263pjo.80.2019.06.14.08.29.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 08:29:30 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-102735-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Fic3FYgv; dkim=pass header.i=@linaro.org header.s=google header.b=SqpwBqlT; spf=pass (google.com: domain of libc-alpha-return-102735-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102735-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=jA/GVTUI1LmQHJt3q5ImOq1A4JnJgYVi0RmGLQ00k9HFZzTLJUp8B B1aesL2VcIg6Z6ZvXvCmxTj7L+q7Va90bgOhm++yD4RCi1aUEs1zMK0YOgIZ3Qmi TZn9Cdkt+hbIv8k7oX66biPPemDY2yjUiizks15yzAunJ0BDN1b7zo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=+TAX+JgHOmAtqSuRT0WeYR3fTPo=; b=Fic3FYgvqbn328XmiwfrcND915eO f92LWXkP6mpkScOElLgfMIfY+ynIh4uc/GF++gYma6fl+TWZTPHM7LXjBmXfM17N Lvf8vlir2AQkJHBfc9QOLYPlqrpeas6ZaABE2zT8QMxbicIVwG+CB3/EPVR7MMip 18EXu23BOnmpNC0= Received: (qmail 116754 invoked by alias); 14 Jun 2019 15:29:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 116745 invoked by uid 89); 14 Jun 2019 15:29:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=respects, Contributed, Maxim, maxim X-HELO: mail-ua1-f67.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=sh4Lsz/b9fl0xLWtmr7mGV/rN3cFaoERP3ybQ5K1W1c=; b=SqpwBqlTly3wGqJZ0v1EsjVa4xck3JBT0/ATnq0GGiHDnzpSDiUtQFVfjV5RnhC99D p8x1H3DkIuoeaTEPYN0VU6oRo4wK8/7Vl0w8WJpGZCblGC76VoVKnu82JFRp6+LpFt0P xlF1ymvG28bXg1IYx9jJexWusfrBcZ4VbTUnZyUr2P4VECp4CiyNza9DFp/eEy9Upl9e t+HGskWgaukohMUhvbX2QlqEoYF7g3MItq2jTkxNCwDs8IgsgD0oOSHTo2P9jcns9f+e f3WJLFbm2tf3/K7W46mW7mXYEkBfKTYUHzouTN0wyA26rHQepQyojynvcOxp9iwzFJfC ZSlA== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 01/12] m68k: Remove vDSO support Date: Fri, 14 Jun 2019 12:28:57 -0300 Message-Id: <20190614152908.8101-1-adhemerval.zanella@linaro.org> Although defined in initial TLS/NPTL ABI for m68k and ColdFire [1], kernel support was never pushed upstream. This patch removes the unused m68k vDSO support. Checked with a build against m68k and m68k-coldfire and some basic tests on ARAnyM. * sysdeps/unix/sysv/linux/m68k/Makefile (sysdep_routines, sysdep-rtld-routines): Remove rules. * sysdeps/unix/sysv/linux/m68k/Versions (libc) [GLIBC_PRIVATE]: Remove __vdso_atomic_cmpxchg_32 and __vdso_atomic_barrier. (ld) [GLIBC_PRIVATE]: __rtld___vdso_read_tp, __rtld___vdso_atomic_cmpxchg_32, and __rtld___vdso_atomic_barrier. * sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h (atomic_compare_and_exchange_val_acq, atomic_full_barrier): Remove vDSO path for SHARED. * sysdeps/unix/sysv/linux/m68k/init-first.c: Remove file. * sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-vdso.c: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-vdso.h: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-helpers.c: New file. [1] https://lists.debian.org/debian-68k/2007/11/msg00071.html --- sysdeps/unix/sysv/linux/m68k/Makefile | 2 - sysdeps/unix/sysv/linux/m68k/Versions | 11 --- .../sysv/linux/m68k/coldfire/atomic-machine.h | 45 +-------- sysdeps/unix/sysv/linux/m68k/init-first.c | 74 --------------- sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c | 1 - sysdeps/unix/sysv/linux/m68k/m68k-helpers.S | 95 ------------------- sysdeps/unix/sysv/linux/m68k/m68k-helpers.c | 26 +++++ sysdeps/unix/sysv/linux/m68k/m68k-vdso.c | 34 ------- sysdeps/unix/sysv/linux/m68k/m68k-vdso.h | 60 ------------ 9 files changed, 27 insertions(+), 321 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/m68k/init-first.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/m68k-helpers.S create mode 100644 sysdeps/unix/sysv/linux/m68k/m68k-helpers.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/m68k-vdso.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/m68k-vdso.h -- 2.17.1 diff --git a/sysdeps/unix/sysv/linux/m68k/Makefile b/sysdeps/unix/sysv/linux/m68k/Makefile index ce1f696a6f..be40fae68a 100644 --- a/sysdeps/unix/sysv/linux/m68k/Makefile +++ b/sysdeps/unix/sysv/linux/m68k/Makefile @@ -18,8 +18,6 @@ endif ifeq ($(subdir),elf) sysdep-dl-routines += dl-static -sysdep_routines += dl-vdso libc-m68k-vdso -sysdep-rtld-routines += m68k-vdso sysdep-others += lddlibc4 install-bin += lddlibc4 endif diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions index 7ecc96ea97..8e72cd18cb 100644 --- a/sysdeps/unix/sysv/linux/m68k/Versions +++ b/sysdeps/unix/sysv/linux/m68k/Versions @@ -40,15 +40,4 @@ libc { GLIBC_2.12 { __m68k_read_tp; } - GLIBC_PRIVATE { - __vdso_atomic_cmpxchg_32; __vdso_atomic_barrier; - } -} - -ld { - GLIBC_PRIVATE { - __rtld___vdso_read_tp; - __rtld___vdso_atomic_cmpxchg_32; - __rtld___vdso_atomic_barrier; - } } diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h b/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h index 7465a98fef..0a2aa9ffa5 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h @@ -21,7 +21,6 @@ #include #include -#include /* Coldfire has no atomic compare-and-exchange operation, but the kernel provides userspace atomicity operations. Use them. */ @@ -43,33 +42,7 @@ typedef uintmax_t uatomic_max_t; #define ATOMIC_EXCHANGE_USES_CAS 1 /* The only basic operation needed is compare and exchange. */ -/* For ColdFire we'll have to trap into the kernel mode anyway, - so trap from the library rather then from the kernel wrapper. */ -#ifdef SHARED -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ - ({ \ - /* Use temporary variables to workaround call-clobberness of \ - the registers. */ \ - __typeof (mem) _mem = mem; \ - __typeof (oldval) _oldval = oldval; \ - __typeof (newval) _newval = newval; \ - register uint32_t *_a0 asm ("a0") = (uint32_t *) _mem; \ - register uint32_t _d0 asm ("d0") = (uint32_t) _oldval; \ - register uint32_t _d1 asm ("d1") = (uint32_t) _newval; \ - void *tmp; \ - \ - asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %2\n\t" \ - "lea (-6, %%pc, %2), %2\n\t" \ - "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32) \ - "@GOT(%2), %2\n\t" \ - "movel (%2), %2\n\t" \ - "jsr (%2)\n\t" \ - : "+d" (_d0), "+m" (*_a0), "=&a" (tmp) \ - : "a" (_a0), "d" (_d1)); \ - (__typeof (oldval)) _d0; \ - }) -#else -# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \ ({ \ /* Use temporary variables to workaround call-clobberness of \ the registers. */ \ @@ -86,24 +59,8 @@ typedef uintmax_t uatomic_max_t; : "a" (_a0), "d" (_d2), "d" (_d1)); \ (__typeof (oldval)) _d0; \ }) -#endif -#ifdef SHARED -# define atomic_full_barrier() \ - ({ \ - void *tmp; \ - \ - asm ("movel #_GLOBAL_OFFSET_TABLE_@GOTPC, %0\n\t" \ - "lea (-6, %pc, %0), %0\n\t" \ - "movel " STR_M68K_VDSO_SYMBOL (__vdso_atomic_barrier) \ - "@GOT(%0), %0\n\t" \ - "movel (%0), %0\n\t" \ - "jsr (%0)\n\t" \ - : "=&a" (tmp)); \ - }) -#else # define atomic_full_barrier() \ (INTERNAL_SYSCALL (atomic_barrier, , 0), (void) 0) -#endif #endif diff --git a/sysdeps/unix/sysv/linux/m68k/init-first.c b/sysdeps/unix/sysv/linux/m68k/init-first.c deleted file mode 100644 index f8f0910839..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/init-first.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Initialization code run first thing by the ELF startup code. Linux/m68k. - Copyright (C) 2010-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Maxim Kuvyrkov , 2010. - - 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 - . */ - -/* Note: linking in vDSO to a static binary requires changes to - the main GLIBC proper. Not yet implemented. */ -#ifdef SHARED - -#include -#include - -static inline void -_libc_vdso_platform_setup (void) -{ - void *p; - - PREPARE_VERSION (linux26, "LINUX_2.6", 61765110); - - /* It may happen that rtld didn't initialize the vDSO, so fallback - to the syscall implementations if _dl_vdso_vsym returns NULL. - This may happen when a static executable dlopen's a dynamic library. - This really is nothing more than a workaround for rtld/csu - deficiency. Ideally, init code would setup the vDSO for static - binaries too. */ - - p = _dl_vdso_vsym ("__kernel_read_tp", &linux26); - if (p != NULL) - { - __vdso_read_tp = p; - __rtld___vdso_read_tp = p; - } - else - assert (__vdso_read_tp == (void *) __vdso_read_tp_stub); - - p = _dl_vdso_vsym ("__kernel_atomic_cmpxchg_32", &linux26); - if (p != NULL) - { - __vdso_atomic_cmpxchg_32 = p; - __rtld___vdso_atomic_cmpxchg_32 = p; - } - else - assert (__vdso_atomic_cmpxchg_32 - == (void *) __vdso_atomic_cmpxchg_32_stub); - - p = _dl_vdso_vsym ("__kernel_atomic_barrier", &linux26); - if (p != NULL) - { - __vdso_atomic_barrier = p; - __rtld___vdso_atomic_barrier = p; - } - else - assert (__vdso_atomic_barrier == (void *) __vdso_atomic_barrier_stub); -} - -#define VDSO_SETUP _libc_vdso_platform_setup - -#endif /* SHARED */ - -#include diff --git a/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c b/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c deleted file mode 100644 index 45982e99b9..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/libc-m68k-vdso.c +++ /dev/null @@ -1 +0,0 @@ -#include "m68k-vdso.c" diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S deleted file mode 100644 index 5e3ffb0a7f..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright (C) 2010-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Maxim Kuvyrkov , 2010. - - 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 - . */ - -#include -#include - - .text - - .hidden __vdso_read_tp_stub -ENTRY (__vdso_read_tp_stub) - move.l #__NR_get_thread_area, %d0 - trap #0 - move.l %d0, %a0 - rts -END (__vdso_read_tp_stub) - -# ifdef SHARED -/* GCC will emit calls to this routine. Linux has an - equivalent helper function (which clobbers fewer registers than - a normal function call) in a vdso; tail call to the - helper. */ -# if IS_IN (rtld) -/* rtld gets a hidden copy of __m68k_read_tp. */ - .hidden __m68k_read_tp -# endif -ENTRY (__m68k_read_tp) - LOAD_GOT (%a0) - move.l M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0 - move.l (%a0), %a0 - jmp (%a0) -END (__m68k_read_tp) - -/* The following two stubs are for macros in atomic.h, they can't - clobber anything. */ - - .hidden __vdso_atomic_cmpxchg_32_stub -ENTRY (__vdso_atomic_cmpxchg_32_stub) - move.l %d2, -(%sp) - cfi_adjust_cfa_offset (4) - cfi_rel_offset (%d2, 0) - move.l %d0, %d2 - move.l #SYS_ify (atomic_cmpxchg_32), %d0 - trap #0 - move.l (%sp)+, %d2 - cfi_adjust_cfa_offset (-4) - cfi_restore (%d2) - rts -END (__vdso_atomic_cmpxchg_32_stub) - - .hidden __vdso_atomic_barrier_stub -ENTRY (__vdso_atomic_barrier_stub) - move.l %d0, -(%sp) - cfi_adjust_cfa_offset (4) - move.l #SYS_ify (atomic_barrier), %d0 - trap #0 - move.l (%sp)+, %d0 - cfi_adjust_cfa_offset (-4) - rts -END (__vdso_atomic_barrier_stub) -# else /* !SHARED */ -/* If the vDSO is not available, use a syscall to get TP. */ - strong_alias (__vdso_read_tp_stub, __m68k_read_tp) -# endif /* SHARED */ diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-helpers.c b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.c new file mode 100644 index 0000000000..df02d560aa --- /dev/null +++ b/sysdeps/unix/sysv/linux/m68k/m68k-helpers.c @@ -0,0 +1,26 @@ +/* Copyright (C) 2019 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 + . */ + +#include + +void * +__m68k_read_tp (void) +{ + INTERNAL_SYSCALL_DECL (err); + return (void*) INTERNAL_SYSCALL_CALL (get_thread_area, err); +} diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c b/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c deleted file mode 100644 index a1345a3a5b..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2010-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Maxim Kuvyrkov , 2010. - - 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 - . */ - -#ifdef SHARED - -#include - -/* Because these pointers are used from other libraries than libc, - they are exported at GLIBC_PRIVATE version. - We initialize them to syscall implementation so that they will be ready - to use from the very beginning. */ -void * M68K_VDSO_SYMBOL (__vdso_read_tp) -= (void *) __vdso_read_tp_stub; -void * M68K_VDSO_SYMBOL (__vdso_atomic_cmpxchg_32) -= (void *) __vdso_atomic_cmpxchg_32_stub; -void * M68K_VDSO_SYMBOL (__vdso_atomic_barrier) -= (void *) __vdso_atomic_barrier_stub; - -#endif /* SHARED */ diff --git a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.h b/sysdeps/unix/sysv/linux/m68k/m68k-vdso.h deleted file mode 100644 index fc71c0f4e1..0000000000 --- a/sysdeps/unix/sysv/linux/m68k/m68k-vdso.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Resolve function pointers to VDSO functions. - Copyright (C) 2010-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Maxim Kuvyrkov , 2010. - - 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 - . */ - - -#ifndef _M68K_VDSO_H -#define _M68K_VDSO_H - -#ifdef SHARED - -# if IS_IN (rtld) -# define M68K_VDSO_SYMBOL(name) __rtld_##name -# define STR_M68K_VDSO_SYMBOL(name) "__rtld_" #name -# else -# define M68K_VDSO_SYMBOL(name) name -# define STR_M68K_VDSO_SYMBOL(name) #name -# endif - -# ifndef __ASSEMBLER__ - -/* We define __rtld_* copies for rtld. - We need them visible in libc to initialize. */ -# if IS_IN (rtld) || IS_IN (libc) -extern void *__rtld___vdso_read_tp; -extern void *__rtld___vdso_atomic_cmpxchg_32; -extern void *__rtld___vdso_atomic_barrier; - -/* These stubs are meant to be invoked only from the assembly. */ -extern void __vdso_read_tp_stub (void); -extern void __vdso_atomic_cmpxchg_32_stub (void); -extern void __vdso_atomic_barrier_stub (void); -# endif /* IS_IN (rtld) || IS_IN (libc) */ - -/* RTLD should only use its own copies. */ -# if !IS_IN (rtld) -extern void *__vdso_read_tp; -extern void *__vdso_atomic_cmpxchg_32; -extern void *__vdso_atomic_barrier; -# endif /* !IS_IN (rtld) */ - -# endif /* !__ASSEMBLER__ */ - -#endif /* SHARED */ - -#endif /* _M68K_VDSO_H */