From patchwork Tue Feb 1 20:10:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1587374 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JpGKC2bblz9s5B for ; Wed, 2 Feb 2022 07:11:11 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A72C385AC30 for ; Tue, 1 Feb 2022 20:11:09 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id CF5113858D35 for ; Tue, 1 Feb 2022 20:11:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CF5113858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D01DE3F3; Tue, 1 Feb 2022 21:10:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BXipPP0FKc2x; Tue, 1 Feb 2022 21:10:58 +0100 (CET) Received: from begin.home (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 5405C343; Tue, 1 Feb 2022 21:10:58 +0100 (CET) Received: from samy by begin.home with local (Exim 4.95) (envelope-from ) id 1nEzUP-009tvW-4v; Tue, 01 Feb 2022 21:10:57 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd, commited] SET_RELHOOK: merge i386 and x86_64, and move to sysdeps/mach/hurd/x86 Date: Tue, 1 Feb 2022 21:10:57 +0100 Message-Id: <20220201201057.2359927-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spamd-Bar: ++++ X-Rspamd-Server: hera Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Queue-Id: D01DE3F3 X-Spamd-Result: default: False [4.90 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; MID_CONTAINS_FROM(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[] X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" It is not Hurd-specific, but H.J. Lu wants it there. Also, dc.a can be used to avoid hardcoding .long vs .quad and thus use the same implementation for i386 and x86_64. --- sysdeps/generic/set-hooks-arch.h | 2 +- .../{i386 => mach/hurd/x86}/set-hooks-arch.h | 4 +-- sysdeps/x86_64/set-hooks-arch.h | 28 ------------------- 3 files changed, 3 insertions(+), 31 deletions(-) rename sysdeps/{i386 => mach/hurd/x86}/set-hooks-arch.h (94%) delete mode 100644 sysdeps/x86_64/set-hooks-arch.h diff --git a/sysdeps/generic/set-hooks-arch.h b/sysdeps/generic/set-hooks-arch.h index 9101646d70..f04e11abfb 100644 --- a/sysdeps/generic/set-hooks-arch.h +++ b/sysdeps/generic/set-hooks-arch.h @@ -21,7 +21,7 @@ #define _SET_HOOKS_ARCH_H /* Define SET_RELHOOK to a variant of text_set_element that records a relative - offset rather than an absolute address. See sysdeps/i386/set-hooks-arch.h + offset rather than an absolute address. See sysdeps/mach/hurd/x86/set-hooks-arch.h for an example. #define SET_RELHOOK(NAME, HOOK) ... diff --git a/sysdeps/i386/set-hooks-arch.h b/sysdeps/mach/hurd/x86/set-hooks-arch.h similarity index 94% rename from sysdeps/i386/set-hooks-arch.h rename to sysdeps/mach/hurd/x86/set-hooks-arch.h index bbc7bef451..863aa76a0c 100644 --- a/sysdeps/i386/set-hooks-arch.h +++ b/sysdeps/mach/hurd/x86/set-hooks-arch.h @@ -1,5 +1,5 @@ /* Machine-dependent macros for using symbol sets for running lists of - functions. i386 version. + functions. x86 version. Copyright (C) 2021-2022 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -22,7 +22,7 @@ #define SET_RELHOOK(NAME, HOOK) \ asm(".section " #NAME",\"aR\"\n" \ - ".long "#HOOK" - .\n" \ + ".dc.a "#HOOK" - .\n" \ ".section .text"); #endif /* set_hooks_arch.h */ diff --git a/sysdeps/x86_64/set-hooks-arch.h b/sysdeps/x86_64/set-hooks-arch.h deleted file mode 100644 index 789e46f1ad..0000000000 --- a/sysdeps/x86_64/set-hooks-arch.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Machine-dependent macros for using symbol sets for running lists of - functions. x86-64 version. - Copyright (C) 2021-2022 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 - . */ - -#ifndef _SET_HOOKS_ARCH_H -#define _SET_HOOKS_ARCH_H - -#define SET_RELHOOK(NAME, HOOK) \ - asm(".section " #NAME",\"aR\"\n" \ - ".quad "#HOOK" - .\n" \ - ".section .text"); - -#endif /* set_hooks_arch.h */