From patchwork Fri Nov 13 16:58:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 41052 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 13EBE39450EB; Fri, 13 Nov 2020 16:58:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13EBE39450EB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1605286738; bh=08Zz7SorYOmOG5WMY8l2130g8p9+wFALxhjSUTcOyxM=; 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=xaIwWP3qRp1H8X0wxgE7iZkWlyiGX/mACZM2uS5QmEPtFQBdxImB9mfL6sNCfyryF tDalvOot47srW/s/Krgm/cW+EYjBbEAxKiays3XwzvW29KaBIxei3jW4fVVowDpe5T cB5FhcQdi2v/aTM9bPVOmVh5DrP/qEU/iiKbxISg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by sourceware.org (Postfix) with ESMTPS id 44171394504C for ; Fri, 13 Nov 2020 16:58:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 44171394504C Received: by mail-qk1-x744.google.com with SMTP id r7so9422892qkf.3 for ; Fri, 13 Nov 2020 08:58:55 -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=08Zz7SorYOmOG5WMY8l2130g8p9+wFALxhjSUTcOyxM=; b=SJodYOoL94pkqX+tDUbtiOytDGPyFGjpDPlnhyeDoI4ZyomvxYTpHQ+X4z1US9npOw JkGB2m6GxHS/+A/5Fk+7SfQ1jiKUyzJyh5a5gDRUzrx99qVmZNGUUjEgIQCG8cENrAgB aBZr+KpqzGvOHPbDG+rFPy4KSj6oYeUwnQuDBpjn9cZlJ65J5emEg9rQmjfOQO8i0gBb GArMa/X5nhxOd/wevcVvPBzg767/m4Y5llIny4q7ZiSl//0eY6R87bT71AaPviy4/9iW 1uwTeXIO6KVjgnUtNV3KRd3jh0rl1BEEuLgUMB3RThww7sSffLkexQQlibtyJV+2HEx4 rNrw== X-Gm-Message-State: AOAM533lQfbcvt6PWs7yfp0ReRVftzkOUdpDYYd+d7jGnfC1TtiY8Gv3 JucRL+DkeoCkH9BTaoq8Lme8tvGCZ1utsA== X-Google-Smtp-Source: ABdhPJyyvgUbDovW0b5S0W9BkOaGhQJpHcSErdj1ZZ92ZKtRR8e6bEngZS9SygtwSk2QyTSZLbn6zg== X-Received: by 2002:a05:620a:228f:: with SMTP id o15mr3023052qkh.206.1605286729619; Fri, 13 Nov 2020 08:58:49 -0800 (PST) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id s16sm7363931qkg.5.2020.11.13.08.58.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2020 08:58:49 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH v2 05/23] linux: Use generic __syscall_error for aarch64 Date: Fri, 13 Nov 2020 13:58:19 -0300 Message-Id: <20201113165837.121629-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201113165837.121629-1-adhemerval.zanella@linaro.org> References: <20201113165837.121629-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 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 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. --- .../aarch64/{sysdep.c => syscall_error.h} | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) rename sysdeps/unix/sysv/linux/aarch64/{sysdep.c => syscall_error.h} (63%) diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.c b/sysdeps/unix/sysv/linux/aarch64/syscall_error.h similarity index 63% rename from sysdeps/unix/sysv/linux/aarch64/sysdep.c rename to sysdeps/unix/sysv/linux/aarch64/syscall_error.h index 6b88f3484f..a45e02dbe4 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.c +++ b/sysdeps/unix/sysv/linux/aarch64/syscall_error.h @@ -1,5 +1,5 @@ -/* Copyright (C) 2011-2020 Free Software Foundation, Inc. - +/* Linux wrappers for setting errno. AArch64 version. + Copyright (C) 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 @@ -13,20 +13,13 @@ 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 + License along with the GNU C Library; if not, see . */ -#include +#ifndef _SYSCALL_ERROR_H +#define _SYSCALL_ERROR_H -long __syscall_error (long err); -hidden_proto (__syscall_error) +#define SYSCALL_ERROR_FUNC 1 +#define SYSCALL_ERROR_FUNC_ATTR -/* 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) +#endif