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-ASN: AS3215 2.6.0.0/16 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, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 48D9C1F5AE for ; Fri, 23 Jul 2021 23:39:32 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D9FC388A414 for ; Fri, 23 Jul 2021 23:39:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D9FC388A414 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627083570; bh=QOGWRC+m+irxGhSHoo+m9Vhj3mujIS5ty7fs8ubf/oo=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xx+jAhZaV42OyWsZbC2/bemctwkV/FysSNllhdwvbJtwWIO4k8sVx8NWi1HKjd5it oj8qEJ7d0aJqLN5J0XfazrV2q55gXunv3++RrzoZzyxeYmqCnYz6ptaX+lNYCy/9Gr Rfh5LXdr5nriGDkFGSnIC3EN4ajJYiFzL39fvuQU= Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 89F073857005 for ; Fri, 23 Jul 2021 23:39:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89F073857005 Received: by mail-pl1-x632.google.com with SMTP id k1so4764999plt.12 for ; Fri, 23 Jul 2021 16:39:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QOGWRC+m+irxGhSHoo+m9Vhj3mujIS5ty7fs8ubf/oo=; b=uoUfICZ4Q4sUWHVozgqX2RnqjOIAlKsCXQuvnKhEYAgS0HtIztwN4mUEbu2TpVj7Hy Tgg1D5vE9BWYNIRrXm3NN6iIhq03Y8rAaPuQ0qR25r8D42a8FFenJw+Php3fLk5MhQjj 12SwbEnSDer5VBoawisCHWRNOq1p0gm8OEanfD5ruLmbw7bW1R6Vl83NbPwWjOrzBisT fbOEQl7Ja568wC6g8+uZ5bWjVtgzmNvYs6yKAq4OMLZSNaMLs43znZIMG+j/bM+VlIGo B3kO6QhHULWCkeSjfomjpqR3q5deHoLC5Fim/650Rar1VOqgrmHh6KC7Pou1hbHb7Ayc aQOQ== X-Gm-Message-State: AOAM532u+vPEsPEO8S+NEuJQT4fWcwPpc0l6y5tnNCuZW+NvB37QfaiU yo9kYWx/Qu8XmQ335CcXP8k8VSC4cduZ3pOo/6c= X-Google-Smtp-Source: ABdhPJzGfZ+cOSn8/Gx/1TWzGrdj/oqV+XhUoY7tS6rv/26inLjlYvKRAOCuBsT4PBsTTjYpfPGFk3U/7DjYy274qYk= X-Received: by 2002:a63:5b02:: with SMTP id p2mr7084597pgb.161.1627083549184; Fri, 23 Jul 2021 16:39:09 -0700 (PDT) MIME-Version: 1.0 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> <87y2o61chx.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87y2o61chx.fsf@oldenburg2.str.redhat.com> Date: Fri, 23 Jul 2021 16:38:33 -0700 Message-ID: Subject: Re: [RFC PATCH 3/3] add r_debug multiple namespaces support To: Florian Weimer , "Metzger, Markus T" Content-Type: text/plain; charset="UTF-8" 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: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: Carlos O'Donell via Libc-alpha , Pedro Alves , Conan C Huang , Florian Weimer , Jeremy Stenglein , xe-linux-external@cisco.com Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Mon, Jun 29, 2020 at 2:49 AM Florian Weimer via Libc-alpha wrote: > > * 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 > I opened: https://gitlab.com/x86-psABIs/Linux-ABI/-/issues/2 with a proposal to extend struct r_debug for libraries loaded with dlmopen, I'd like to resolve it for the next releases of glibc, binutils and GDB. -- H.J.