From patchwork Sat Jun 16 01:06:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 930289 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-93295-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="fHur57+q"; 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 416zhz01ntz9s3q for ; Sat, 16 Jun 2018 11:06:58 +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=MiYYhQJTeYcVxc+at4Lal86aill55Bk f47ReX1d+3ubeAkWOFtf1ctqT9LgkzjNYCzUoK3pr7iqvUVe+D/kglZ9r2QRJkny gcXtMsQgqkhjqYzO3tGvRlE3TFsvkn7+lnuJp4EeZBfb2smuCf+f0l/nCADVccd+ auNrUZJ+bK84= 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=fQb4vd2yui2eLpKtOR6qRExk0Xk=; b=fHur5 7+qtFFbg+/FUBc7R6p+ECZ9mOU9/a9ZunF66wpYuAmaX6n3Qp5q33/ok2XJ2Fq6W xLqws32Ttae8rfRuZZGFkxZpHwUeukUXRXe7Kl8n5sTVVuS5q4QsaIyww0rHuZkV E5OG3yMcIvYgpknaKF8d22LS0EMfF89OwFVZrs= Received: (qmail 65746 invoked by alias); 16 Jun 2018 01:06:37 -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 65573 invoked by uid 89); 16 Jun 2018 01:06:36 -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=Hx-spam-relays-external:sk:static-, H*r:sk:static-, H*RU:sk:static- X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited 5/8] hurd: Avoid PLT references to shortcuts Date: Sat, 16 Jun 2018 03:06:24 +0200 Message-Id: <20180616010627.29577-5-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> * sysdeps/mach/include/mach-shortcuts-hidden.h: New file. * mach/shortcut.awk: Make syscall stubs include and add hidden definition. * sysdeps/mach/include/mach.h: Include . --- ChangeLog | 4 ++++ mach/shortcut.awk | 2 ++ sysdeps/mach/include/mach-shortcuts-hidden.h | 13 +++++++++++++ sysdeps/mach/include/mach.h | 1 + 4 files changed, 20 insertions(+) create mode 100644 sysdeps/mach/include/mach-shortcuts-hidden.h diff --git a/ChangeLog b/ChangeLog index 7ceaa829a8..4defdb6462 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,10 @@ * sysdeps/htl/pthreadP.h (___pthread_get_cleanup_stack): Remove prototype. * sysdeps/mach/hurd/localplt.data (ld.so): Make ref to __open optional. + * sysdeps/mach/include/mach-shortcuts-hidden.h: New file. + * mach/shortcut.awk: Make syscall stubs include + and add hidden definition. + * sysdeps/mach/include/mach.h: Include . 2018-06-15 Joseph Myers diff --git a/mach/shortcut.awk b/mach/shortcut.awk index ea283d49ba..090da82b6a 100644 --- a/mach/shortcut.awk +++ b/mach/shortcut.awk @@ -1,6 +1,7 @@ # Icky intimate knowledge of MiG output. BEGIN { print "/* This file is generated by shortcut.awk. */"; + print "#include "; echo=1; inproto=0; proto=""; arglist=""; } @@ -44,6 +45,7 @@ echo == 1 { print $0; } print " return err;" print "}"; print "weak_alias (" call ", " alias ")"; + print "libc_hidden_def (" call ")"; # Declare RPC so the weak_alias that follows will work. print "extern __typeof (" call ") " rpc ";"; echo = 1; diff --git a/sysdeps/mach/include/mach-shortcuts-hidden.h b/sysdeps/mach/include/mach-shortcuts-hidden.h new file mode 100644 index 0000000000..0942871f26 --- /dev/null +++ b/sysdeps/mach/include/mach-shortcuts-hidden.h @@ -0,0 +1,13 @@ +#include +libc_hidden_proto (__task_create) +libc_hidden_proto (__task_terminate) +libc_hidden_proto (__vm_allocate) +libc_hidden_proto (__vm_deallocate) +libc_hidden_proto (__task_suspend) +libc_hidden_proto (__task_set_special_port) +libc_hidden_proto (__vm_map) +libc_hidden_proto (__thread_depress_abort) +libc_hidden_proto (__mach_port_allocate_name) +libc_hidden_proto (__mach_port_allocate) +libc_hidden_proto (__mach_port_deallocate) +libc_hidden_proto (__mach_port_insert_right) diff --git a/sysdeps/mach/include/mach.h b/sysdeps/mach/include/mach.h index b4c2f45240..fff8349b82 100644 --- a/sysdeps/mach/include/mach.h +++ b/sysdeps/mach/include/mach.h @@ -1,5 +1,6 @@ #ifndef _MACH_H #include_next +#include #ifndef _ISOMAC libc_hidden_proto (__mach_msg_destroy) #endif