From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 075B43858CDB for ; Thu, 20 Jul 2023 16:53:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 075B43858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689872009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=zyNRDx3aDHHYmCeITOir5mLMvFt2lNKIzBIb3WamPic=; b=Su02/+Vx7R9bAjee0+LpDZKbEBdN9B3y2OqsNCzpx/zLIA74uGLQHKuk2YaLp+tanryObo 5o33ykHYSKmWirzTl5QDlPSsPQJIQ0nZUK0on+lkFXA4c+5UB5glY6+MkXjTKVI1EDLydx hSlQlTqngz9iDmCfpnWoY8BKQ+2shlU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-177-i0cMwgB0MlWgI8XfBj5fyg-1; Thu, 20 Jul 2023 12:53:26 -0400 X-MC-Unique: i0cMwgB0MlWgI8XfBj5fyg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C8C04805BC3; Thu, 20 Jul 2023 16:53:25 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.13]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 160FBC2C857; Thu, 20 Jul 2023 16:53:24 +0000 (UTC) From: Florian Weimer To: libc-alpha@sourceware.org Cc: libc-stable@sourceware.org Subject: [PATCH 2.34] debug: Mark libSegFault.so as NODELETE Date: Thu, 20 Jul 2023 18:53:23 +0200 Message-ID: <87cz0mmsn0.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The signal handler installed in the ELF constructor cannot easily be removed again (because the program may have changed handlers in the meantime). Mark the object as NODELETE so that the registered handler function is never unloaded. Submitting this for 2.34 because libSegFault.so was removed in 2.35. Verified using readelf -dW that NODELETE is now set on libSegFault.so. (Note that there is no lib prefix on the LDFLAGS variable.) --- debug/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debug/Makefile b/debug/Makefile index 71248e0d45..9fbc40dc69 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -213,6 +213,8 @@ extra-libs-others = $(extra-libs) libSegFault-routines = segfault libSegFault-inhibit-o = $(filter-out .os,$(object-suffixes)) +# libSegFault.so installs a signal handler in its ELF constructor. +LDFLAGS-SegFault.so = -Wl,--enable-new-dtags,-z,nodelete libpcprofile-routines = pcprofile libpcprofile-inhibit-o = $(filter-out .os,$(object-suffixes)) base-commit: cad3adf4ddeada37912c1c13b59a2ea5dd5d2832