From patchwork Thu Jul 8 16:32:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Dasmohapatra X-Patchwork-Id: 44258 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com 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 B3AEC39DC4C3 for ; Thu, 8 Jul 2021 16:37:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3AEC39DC4C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625762231; bh=sv2cpowXCAugIc2ba/lyd9gR+vPWQiZrw687Qs7ddAI=; 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=y26fzTsjyX9lswGFWdeaL80HfQgLCyOc5AyUq+wRowoz5S0/RrVxpavIhn8Fo/J69 QBEQFd+91TiJ2B6JFghKnyYevA+PaEoSEUsulO5eOmpUmGiZ0LS5+yXyxKXSO+3FH0 WPPSMY551Vj/ygjoo2T417OiJxhzAjI9Yr4WllGc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by sourceware.org (Postfix) with ESMTPS id B168A399C025 for ; Thu, 8 Jul 2021 16:33:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B168A399C025 Received: from noise.cbg.collabora.co.uk (unknown [IPv6:2001:4d48:ad5c:ef00:8e70:5aff:fe59:c29c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id AA24D1F43F5F for ; Thu, 8 Jul 2021 17:33:03 +0100 (BST) To: libc-alpha@sourceware.org Subject: [RFC][PATCH v12 8/8] Drop DT_GNU_FLAGS_1/DF_GNU_1_UNIQUE from the libpthread DSO Date: Thu, 8 Jul 2021 17:32:55 +0100 Message-Id: <20210708163255.812-9-vivek@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210708163255.812-1-vivek@collabora.com> References: <20210708163255.812-1-vivek@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: =?utf-8?q?Vivek_Das=C2=A0Mohapatra_via_Libc-alpha?= From: Vivek Dasmohapatra Reply-To: =?utf-8?q?Vivek_Das=C2=A0Mohapatra?= Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" libpthread should have no contents that are sensitive to duplication anymore, so doesn't require special treatment under dlmopen. --- extra-lib.mk | 2 ++ htl/Makefile | 3 ++- nptl/Makefile | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extra-lib.mk b/extra-lib.mk index 9051958ec0..38184adae1 100644 --- a/extra-lib.mk +++ b/extra-lib.mk @@ -102,9 +102,11 @@ $(objpfx)$(lib).so: $(firstword $($(lib)-map) \ $(filter $(lib).map, \ $(version-maps)))) ifneq ($(ld-zunique),yes) +ifneq ($(lib),libpthread) $(objpfx)$(lib).so: $(common-objpfx)/elf/dynamic-notes.os endif endif +endif endif diff --git a/htl/Makefile b/htl/Makefile index c2a25dcd79..ce6d9a8cd1 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -202,9 +202,10 @@ $(inst_libdir)/libpthread_syms.a: $(srcdir)/libpthread_syms.a $(+force) libc-link.so = $(common-objpfx)libc.so extra-B-pthread.so = -B$(common-objpfx)htl/ +# Turn off DF_GNU_1_UNIQUE for libpthread now that it's a stub. LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst ifeq ($(ld-zunique),yes) -LDFLAGS-pthread.so += -Wl,-z,unique +LDFLAGS-pthread.so += -Wl,-z,nounique endif include ../Rules diff --git a/nptl/Makefile b/nptl/Makefile index 81353b9455..7fcddbb263 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -376,8 +376,9 @@ CPPFLAGS-tst-pthread-gdb-attach-static.c := \ tst-pthread-gdb-attach-no-pie = yes LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst +# Turn off DF_GNU_1_UNIQUE for libpthread now that it's a stub. ifeq ($(ld-zunique),yes) -LDFLAGS-pthread.so += -Wl,-z,unique +LDFLAGS-pthread.so += -Wl,-z,nounique endif tests += tst-cancelx7 tst-cancelx17 tst-cleanupx4