From patchwork Mon Nov 9 20:18:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 40985 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 744B23973030; Mon, 9 Nov 2020 20:18:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 744B23973030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604953126; bh=kMdryxSuQJM0J4lvN3hdlZemkM7r49fx48/fVwUi228=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=bk05xLLeUMLS4vP/lH86enNuO+L+4DQpeg66Cyq+99De+NvicDl0tFtT/px7TipLv fZ10oLpF2a/sp28jIykQyhVDBeTKG1cVT7va6r7BVN/ColrRHDlj+OA+jXIVzNV4EN tGXHgp6+BR0RK2+UJTD4NoGd8kjX4XMTBNfrqfGc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by sourceware.org (Postfix) with ESMTPS id 4B90739724AB for ; Mon, 9 Nov 2020 20:18:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4B90739724AB Received: by mail-qt1-x841.google.com with SMTP id i7so6963576qti.6 for ; Mon, 09 Nov 2020 12:18:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kMdryxSuQJM0J4lvN3hdlZemkM7r49fx48/fVwUi228=; b=C0uxekN1uSamIOCNSi3FYhw36BK1urZ0i1A1gMNS0lIVN441LZLXCx68Wnjr8CS7Gv T5Gnzhg8ElQKVFKAfm5cSVbUDYKpk6hY2KvL2AN3uX4unhLwBipfBZvAmdjCI4/QUYxT DwYWBhyGe1XX14qBB3rypwvmjnfh0nIHI/CTENZg4YnumnuxTxQ0cN37xjiu2DA2kp5Z Hbvrl8tibDo0o+Qkq8RKnbd6KnfX6QRc5Hybta0Tt1KRceej5ePOyDcz4/fHrCWDCQGI 6tPiU9WTrqXeN9QlH8Wx4mZu2f+PEs5zzH1K7ZS/rnpJUZVdHuVPcxcrJxjXiVSeUgIG qJJw== X-Gm-Message-State: AOAM532wPR7+xR8sA16qGQ+eBoPnIhi6ORnslbrjEmmDYt+j2zXKkElf cvYaIx9euCvPiZ7YgcAeQuaMc49g5/j+iw== X-Google-Smtp-Source: ABdhPJy5JA0vb3sXioZQgm84kZYcjxa3+/Qk2/qd5EqKNCXL+Zdc2By/B28Fs5Q9XqlL6i2VelP76g== X-Received: by 2002:ac8:7445:: with SMTP id h5mr14061839qtr.334.1604953123688; Mon, 09 Nov 2020 12:18:43 -0800 (PST) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id z2sm6843407qkl.22.2020.11.09.12.18.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 12:18:43 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH 06/23] linux: Use generic __syscall_error for aarch64 Date: Mon, 9 Nov 2020 17:18:09 -0300 Message-Id: <20201109201826.120534-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201109201826.120534-1-adhemerval.zanella@linaro.org> References: <20201109201826.120534-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The auto-generated syscalls calls the __syscall_error, although setting using inline function generates slight less code: --- sizes-aarch64-linux-gnu.outline +++ sizes-aarch64-linux-gnu.inline text data bss dec hex filename 1388874 19096 14520 1422490 15b49a libc.so - 138509 7136 344 145989 23a45 elf/ld.so - 98439 1636 16656 116731 1c7fb nptl/libpthread.so - 23942 1236 248 25426 6352 rt/librt.so + 138449 7136 344 145929 23a09 elf/ld.so + 98567 1636 16656 116859 1c87b nptl/libpthread.so + 23918 1236 248 25402 633a rt/librt.so Checked on aarch64-linux-gnu. --- sysdeps/unix/sysv/linux/aarch64/sysdep.c | 32 ------------------------ sysdeps/unix/sysv/linux/aarch64/sysdep.h | 2 ++ 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/aarch64/sysdep.c diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.c b/sysdeps/unix/sysv/linux/aarch64/sysdep.c deleted file mode 100644 index 6b88f3484f..0000000000 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (C) 2011-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 - . */ - -#include - -long __syscall_error (long err); -hidden_proto (__syscall_error) - -/* This routine is jumped to by all the syscall handlers, to stash - an error number into errno. */ -long -__syscall_error (long err) -{ - __set_errno (- err); - return -1; -} -hidden_def (__syscall_error) diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 319a7c7ac5..e1cda79449 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -19,6 +19,8 @@ #ifndef _LINUX_AARCH64_SYSDEP_H #define _LINUX_AARCH64_SYSDEP_H 1 +#define SYSCALL_ERROR_FUNC + #include #include #include