From patchwork Sun Dec 1 18:53:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1202894 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=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107576-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="qbtlDB3y"; 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 47Qy7r6B7rz9sPL for ; Mon, 2 Dec 2019 05:53:44 +1100 (AEDT) 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:mime-version:content-transfer-encoding; q=dns; s= default; b=xHWt+FNoJ8dqVKMOX7edLn3FX/khxfGTbB/rQoihRQJFNyR6gi+pO xLA0lXEaxoiykv0Q/cttXbRUePxmqdVpoCt6x8SmQIkJcbJOaZxvuCXkYGmcYOWX nbYxE6SEwK4074dhc5qLgtZGrcFE5NHwMupity3g93omEc59DI4giI= 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:mime-version:content-transfer-encoding; s=default; bh=ozbiQIj5cN0Ki2nTpiTUb827LjM=; b=qbtlDB3yUmAOeqPPwkLI62gpWvPT 7uG0iNdcwx0AdFWyN/q1CgFWO6nZlx25Jn6UkDrHXH5UNurFidC5RmuXUfX5JtSV RMasUh5fCbdJYjczadJCZIp1/LgKeBqt+J10d61GKve2XTqNLcvT83vfU7a2zJfx V3lrLpfwABoJAVs= Received: (qmail 44378 invoked by alias); 1 Dec 2019 18:53:14 -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 44247 invoked by uid 89); 1 Dec 2019 18:53:14 -0000 Authentication-Results: sourceware.org; auth=none 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, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=H*RU:800, HX-Spam-Relays-External:800, H*r:800, user's X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited 1/3] hurd: Fix ld.so link Date: Sun, 1 Dec 2019 19:53:04 +0100 Message-Id: <20191201185306.1159853-2-samuel.thibault@ens-lyon.org> In-Reply-To: <20191201185306.1159853-1-samuel.thibault@ens-lyon.org> References: <20191201185306.1159853-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Since a2e8aa0d9ea6 ("Block signals during the initial part of dlopen") dl_open uses sigprocmask, so we need a stub implementation. --- sysdeps/mach/hurd/Versions | 4 ++-- sysdeps/mach/hurd/dl-sysdep.c | 15 ++++++++++++--- sysdeps/mach/hurd/i386/ld.abilist | 1 + sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/localplt.data | 1 + 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/sysdeps/mach/hurd/Versions b/sysdeps/mach/hurd/Versions index f69d5fef67..cd148c820f 100644 --- a/sysdeps/mach/hurd/Versions +++ b/sysdeps/mach/hurd/Versions @@ -1,7 +1,7 @@ libc { GLIBC_2.0 { # functions with a weak definition in the dynamic linker - __access; __getcwd; __mmap; + __access; __getcwd; __mmap; __sigprocmask; } GLIBC_2.2.6 { # functions with a weak definition in the dynamic linker @@ -26,7 +26,7 @@ ld { __mmap; __open; __read; __sbrk; __strtoul_internal; __write; __writev; __xstat64; __fxstat64; _exit; _hurd_intr_rpc_mach_msg; - abort; + abort; __sigprocmask; } GLIBC_2.2 { # functions that must be shared with libc diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index 719d603f44..fcbbe6a43a 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -264,13 +264,14 @@ _dl_sysdep_start_cleanup (void) __mach_port_deallocate (__mach_task_self (), __mach_task_self_); } -/* Minimal open/close/mmap implementation sufficient for initial loading of +/* Minimal open/close/mmap/etc. implementation sufficient for initial loading of shared libraries. These are weak definitions so that when the dynamic linker re-relocates itself to be user-visible (for -ldl), it will get the user's definition (i.e. usually libc's). - They also need to be set in the ld section of sysdeps/mach/hurd/Versions, to - be overridable, and in libc.abilist and ld.abilist to be checked. */ + They also need to be set in the libc and ld section of + sysdeps/mach/hurd/Versions, to be overridable, and in libc.abilist and + ld.abilist to be checked. */ /* This macro checks that the function does not get renamed to be hidden: we do need these to be overridable by libc's. */ @@ -674,6 +675,14 @@ strong_alias (abort, __GI___chk_fail) strong_alias (abort, __GI___fortify_fail) strong_alias (abort, __GI___assert_fail) strong_alias (abort, __GI___assert_perror_fail) + +check_no_hidden(__sigprocmask); +int weak_function +__sigprocmask (int how, const sigset_t *set, sigset_t *oset) +{ + /* We do not have signals yet at this stage. */ + return 0; +} /* This function is called by interruptible RPC stubs. For initial dynamic linking, just use the normal mach_msg. Since this defn is diff --git a/sysdeps/mach/hurd/i386/ld.abilist b/sysdeps/mach/hurd/i386/ld.abilist index c76b913486..09ff013c1f 100644 --- a/sysdeps/mach/hurd/i386/ld.abilist +++ b/sysdeps/mach/hurd/i386/ld.abilist @@ -8,6 +8,7 @@ GLIBC_2.2.6 __open F GLIBC_2.2.6 __open64 F GLIBC_2.2.6 __read F GLIBC_2.2.6 __sbrk F +GLIBC_2.2.6 __sigprocmask F GLIBC_2.2.6 __strtoul_internal F GLIBC_2.2.6 __write F GLIBC_2.2.6 __writev F diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 7c2cb2b05a..54270e4ce2 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -426,6 +426,7 @@ GLIBC_2.2.6 __signbit F GLIBC_2.2.6 __signbitf F GLIBC_2.2.6 __signbitl F GLIBC_2.2.6 __sigpause F +GLIBC_2.2.6 __sigprocmask F GLIBC_2.2.6 __sigsetjmp F GLIBC_2.2.6 __sigsuspend F GLIBC_2.2.6 __stpcpy F diff --git a/sysdeps/mach/hurd/i386/localplt.data b/sysdeps/mach/hurd/i386/localplt.data index a5b5241b84..1aef944337 100644 --- a/sysdeps/mach/hurd/i386/localplt.data +++ b/sysdeps/mach/hurd/i386/localplt.data @@ -40,6 +40,7 @@ ld.so: __sbrk ld.so: __strtoul_internal #ld.so: _exit ld.so: abort +ld.so: __sigprocmask ld.so: _hurd_intr_rpc_mach_msg ld.so: __errno_location # rtld_hidden is currently disabled to avoid having to special-case the