From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1C9AE1F5AE for ; Mon, 29 Jun 2020 09:42:15 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59AF7388F044; Mon, 29 Jun 2020 09:42:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59AF7388F044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1593423734; bh=gr1YCRaoaNam5XxLinLnw0H/BS/5rkicLhbeEK6qlkY=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=M20tWtbktSVpVDyZyosK/6naWPsXRIX8xOPy3eiH7AVuPht5aJlWdiFEqZNBfSUfL g+clLUBbzOKQy5Y56Y/uO1HpiWwuYN3HC9fCLJng4ASp1L+tXqv20ukJrSlOxh7zEd 0RFBFBSLnwXVdTBvi/roYDlBx6d06c++zeo9MVyE= Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id 4D879388E83D for ; Mon, 29 Jun 2020 09:42:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4D879388E83D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-463-cGYtEIeaOEe0dkNrXTseGA-1; Mon, 29 Jun 2020 04:51:13 -0400 X-MC-Unique: cGYtEIeaOEe0dkNrXTseGA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7E1DE107ACF8; Mon, 29 Jun 2020 08:51:12 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-196.ams2.redhat.com [10.36.112.196]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E84725C1BD; Mon, 29 Jun 2020 08:51:07 +0000 (UTC) To: Carlos O'Donell via Libc-alpha Subject: Re: [RFC PATCH 3/3] add r_debug multiple namespaces support References: <20200626193228.1953-4-danielwa@cisco.com> <87ftah5yh8.fsf@oldenburg2.str.redhat.com> <210c992f-b034-3ef7-440c-f67ab1b3acdb@redhat.com> <87366h5xmi.fsf@oldenburg2.str.redhat.com> <7e2fb426-cf03-a8e7-6524-a5f81fcf5b9e@redhat.com> <87ftagyhra.fsf@mid.deneb.enyo.de> <8a15bd93-e4cc-a3bc-f902-5b3e701ec4e3@redhat.com> Date: Mon, 29 Jun 2020 10:51:06 +0200 In-Reply-To: <8a15bd93-e4cc-a3bc-f902-5b3e701ec4e3@redhat.com> (Carlos O'Donell via Libc-alpha's message of "Sun, 28 Jun 2020 08:34:32 -0400") Message-ID: <87y2o61chx.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Pedro Alves , Conan C Huang , Florian Weimer , Jeremy Stenglein , xe-linux-external@cisco.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Carlos O'Donell via Libc-alpha: >>> I'm not sure it would work to version _r_debug, since the debugger >>> is using DT_DEBUG and we only get to put one value in that >>> .dynamic entry. >> >> The symbol version is needed to avoid problems due to copy relocations >> if the symbol is referenced directly from the main program. Without >> that, the object could be truncated. It's not a debugger >> compatibility feature. > > Correct, but this violates *how* you're supposed to use _r_debug. If it is possible to link against it, we need to add the new symbol version, in my opinion. > In the dynamic case it is different. The symbol should be looked up > via DT_DEBUG only which always points to the library-local address > of the data object (and the most recent version). In effect this > bypasses the COPY relocation? How is this supposed to work if the dynamic linker does contain DT_DEBUG? I only observe DT_DEBUG in PIE binaries, but since the dynamic loader is mapped at a random address even for ET_EXEC main programs, there must be some other mechanism to locate it. Thanks, Florian