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: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 [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 827DE1F8C6 for ; Sun, 15 Aug 2021 13:18:09 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B3C30388C02B for ; Sun, 15 Aug 2021 13:18:08 +0000 (GMT) Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id D30D63857C67; Sun, 15 Aug 2021 13:17:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D30D63857C67 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=deneb.enyo.de Received: from [172.17.203.2] (port=43633 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1mFG0g-0005OK-D4; Sun, 15 Aug 2021 13:17:06 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.94.2) (envelope-from ) id 1mFG0g-0008Rj-3M; Sun, 15 Aug 2021 15:17:06 +0200 From: Florian Weimer To: "H.J. Lu" Subject: Re: [PATCH] elf: Add -z [dt-debugsz|nodt-debugsz] to emit DT_DEBUGSZ References: <20210815002338.2779683-1-hjl.tools@gmail.com> <87a6lix6qe.fsf@mid.deneb.enyo.de> Date: Sun, 15 Aug 2021 15:17:06 +0200 In-Reply-To: (H. J. Lu's message of "Sun, 15 Aug 2021 06:11:02 -0700") Message-ID: <875yw6x2y5.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 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: , Cc: GNU C Library , Binutils , "H.J. Lu via Gdb-patches" Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" * H. J. Lu: > On Sun, Aug 15, 2021 at 5:50 AM H.J. Lu wrote: >> >> On Sun, Aug 15, 2021 at 4:55 AM Florian Weimer wrote: >> > >> > * H. J. Lu via Gdb-patches: >> > >> > > Add -z [dt-debugsz|nodt-debugsz] to emit a DT_DEBUGSZ dynamic tag so >> > > that the dynamic linker can set its value to the size of the structure >> > > of debugger interface, whose address is stored in the DT_DEBUG dynamic >> > > tag, used by the dynamic linker. >> > >> > I do not think this is necessary. We can increase the version number >> > in the existing DT_DEBUG structure. >> >> Some debuggers expect r_version == 1. > > GDB has > > if (linux_read_memory (priv->r_debug + lmo->r_version_offset, > (unsigned char *) &r_version, > sizeof (r_version)) != 0 > || r_version != 1) > { > warning ("unexpected r_debug version %d", r_version); > } > else if (read_one_ptr (priv->r_debug + lmo->r_map_offset, > &lm_addr, ptr_size) != 0) > { > warning ("unable to read r_map from 0x%lx", > (long) priv->r_debug + lmo->r_map_offset); > } Does this mean it's just a warning?