From patchwork Sat Jun 16 01:06:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 930293 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-93299-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="FR/RPOdp"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 416zjc2x1jz9s3q for ; Sat, 16 Jun 2018 11:07:32 +1000 (AEST) 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:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=vQuuRAlg0cYuWhNtVqrEfe2BhTvaEVw yvxNKWz8hlNFw6N2ctegAUA+7+xPVhtxGjUEKLN4hV8k56tChYLRmda4GpHYBGZq EA/RfWciwCes8t6LlLGVd5rLm24VHcQVXH2bpFaAWnRPKUVRj7UcGuFDDKPQkC9G 6MsB/kAwJJlc= 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:cc:subject:date:message-id:in-reply-to :references; s=default; bh=16saoPj2s3v2R5XVPnWs3Fc437w=; b=FR/RP OdpNt8smQxT0ckJpWXC/9JsOh/9aymvZtNeLPecLQB8C/LR/K4gsuTYXv6obgVFY /lEWkkwip+7FxgtjInE8HwefOEBJ0c+S5NTvsg0MmIWnaAo4XFVwLQmfrQX+XaJM 6bHXjbZp+QMGB6wvpvMYs4Rgl8Ff7fHyVumS4E= Received: (qmail 66439 invoked by alias); 16 Jun 2018 01:06:41 -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 66172 invoked by uid 89); 16 Jun 2018 01:06:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL, URIBL_RED autolearn=ham version=3.3.2 spammy=UD:mk X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited 7/8] hurd: Avoid PLT references to syscalls Date: Sat, 16 Jun 2018 03:06:26 +0200 Message-Id: <20180616010627.29577-7-samuel.thibault@ens-lyon.org> In-Reply-To: <20180616010627.29577-1-samuel.thibault@ens-lyon.org> References: <20180616010627.29577-1-samuel.thibault@ens-lyon.org> * mach/Makefile ($(mach-syscalls:%=$(objpfx))): Add hidden definition. * sysdeps/mach/include/mach/mach_traps.h (__mach_reply_port, __mach_thread_self, __mach_task_self, __mach_host_self, __swtch, __swtch_pri, __thread_switch, __evc_wait): Add hidden prototypes. --- ChangeLog | 4 ++++ mach/Makefile | 3 ++- sysdeps/mach/include/mach/mach_traps.h | 20 ++++++++++++++------ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d81c823448..8c4b6ccd2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,10 @@ (__mach_msg): Add hidden prototype. * mach/msg.c: Include . (__mach_msg): Add hidden definition. + * mach/Makefile ($(mach-syscalls:%=$(objpfx))): Add hidden definition. + * sysdeps/mach/include/mach/mach_traps.h (__mach_reply_port, + __mach_thread_self, __mach_task_self, __mach_host_self, __swtch, + __swtch_pri, __thread_switch, __evc_wait): Add hidden prototypes. 2018-06-15 Joseph Myers diff --git a/mach/Makefile b/mach/Makefile index 2683587b2d..435ae6882d 100644 --- a/mach/Makefile +++ b/mach/Makefile @@ -97,7 +97,8 @@ else $(mach-syscalls:%=$(objpfx)%.S): $(objpfx)%.S: $(objpfx)mach-syscalls.mk (echo '#include '; \ echo 'kernel_trap (__$*,$(sysno-$*),$(nargs-$*))'; \ - echo 'weak_alias (__$*, $*)') > $@-new + echo 'weak_alias (__$*, $*)'; \ + echo 'libc_hidden_def (__$*)') > $@-new mv -f $@-new $@ generated += $(mach-syscalls:=.S) endif # mach-syscalls diff --git a/sysdeps/mach/include/mach/mach_traps.h b/sysdeps/mach/include/mach/mach_traps.h index d1b2febac1..2d4c1f9c5f 100644 --- a/sysdeps/mach/include/mach/mach_traps.h +++ b/sysdeps/mach/include/mach/mach_traps.h @@ -1,13 +1,21 @@ #ifndef _MACH_MACH_TRAPS_H #include_next -extern mach_port_t __mach_reply_port (void) attribute_hidden; +extern mach_port_t __mach_reply_port (void); +libc_hidden_proto (__mach_reply_port) extern mach_port_t __mach_thread_self (void); +libc_hidden_proto (__mach_thread_self) extern mach_port_t (__mach_task_self) (void); -extern mach_port_t (__mach_host_self) (void) attribute_hidden; -extern boolean_t __swtch (void) attribute_hidden; -extern boolean_t __swtch_pri (int priority) attribute_hidden; +libc_hidden_proto (__mach_task_self) +extern mach_port_t (__mach_host_self) (void); +libc_hidden_proto (__mach_host_self) +extern boolean_t __swtch (void); +libc_hidden_proto (__swtch) +extern boolean_t __swtch_pri (int priority); +libc_hidden_proto (__swtch_pri) kern_return_t __thread_switch (mach_port_t new_thread, - int option, mach_msg_timeout_t option_time) attribute_hidden; -kern_return_t __evc_wait (unsigned int event) attribute_hidden; + int option, mach_msg_timeout_t option_time); +libc_hidden_proto (__thread_switch) +kern_return_t __evc_wait (unsigned int event); +libc_hidden_proto (__evc_wait) #endif