From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zPcOIekSGWHtYgAAWB0awg (envelope-from ) for ; Sun, 15 Aug 2021 09:13:13 -0400 Received: by simark.ca (Postfix, from userid 112) id 679A31EDFB; Sun, 15 Aug 2021 09:13:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5CFE81EA7E for ; Sun, 15 Aug 2021 09:13:09 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59DC8384BC21 for ; Sun, 15 Aug 2021 13:13:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59DC8384BC21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629033188; bh=2njx3+qNKB+/SGRhQ+gLSe/NLpHD2gApRI7BLymPb4c=; 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=E45BCb8LiQRmkS1Ua5zqCbl8QqKp+4m2Pfm5TZ/vW2Q4XnG0Cemj9MLIN3C/ywTiN S0xFXEiLx/LuvGm3Eo9/9QecilnzbAmTr4kCJ8sT0tZXFZIgP9yNs2JzTj1NKDmf/B UWCNJ1Qy3PfgPHy+99eTKmp8qmLVZrtRu17JP9W8= Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by sourceware.org (Postfix) with ESMTPS id 433A73857C67; Sun, 15 Aug 2021 13:11:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 433A73857C67 Received: by mail-pj1-x102b.google.com with SMTP id j1so22385815pjv.3; Sun, 15 Aug 2021 06:11:39 -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=2njx3+qNKB+/SGRhQ+gLSe/NLpHD2gApRI7BLymPb4c=; b=ldjCyKzJ62P42HzYqTyN24D0CzMx/r6l+VnM75Wg60/qqGokgJLp7DmGp921uDHSmf Bo0mTocQfN1/PVbT1gYc7EUTl9wXX6LajmslttfBOsutPVHhkoxlDl/dYKQ6jv/9yQRt aOxriAsLA7GIuqu2+7/7Qkd0gCZzgBuWDOqhXVyg7lGBvsKRZJrkxVGDJS6yrRa51kVE vFYMexLzC8IyRT+eTu5WSXGDvpHFxrbpG3TDOWre1MBQoncVIphhvVLlY0Vdr2DzBv5S jsAZuT9wyfL50xFY65kBvM/pq7nzI9tmi49Z56vc2IrM0OEaaZ/vvIp4rqXC1VCMCf/e 9O5A== X-Gm-Message-State: AOAM533q8GkeDlghauiTYAtBl70ECZRC9RYdwpbCNFlaSBw7cVr4eKjl K+F7x3bHU5dV7stS+y+jrdcs77USY5NeEnXQOsah86gO3nM= X-Google-Smtp-Source: ABdhPJywxO7/xkLEZzW5Q7qzUQ/BTP7ZhKEBY644NiK7PGBJG6VAqNfOVYSvis5bvPuh2BjkViGRGFEFZNtg+1VPAqg= X-Received: by 2002:a17:90b:14c3:: with SMTP id jz3mr5535087pjb.153.1629033098354; Sun, 15 Aug 2021 06:11:38 -0700 (PDT) MIME-Version: 1.0 References: <20210815002338.2779683-1-hjl.tools@gmail.com> <87a6lix6qe.fsf@mid.deneb.enyo.de> In-Reply-To: Date: Sun, 15 Aug 2021 06:11:02 -0700 Message-ID: Subject: Re: [PATCH] elf: Add -z [dt-debugsz|nodt-debugsz] to emit DT_DEBUGSZ To: Florian Weimer Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "H.J. Lu via Gdb-patches" Reply-To: "H.J. Lu" Cc: GNU C Library , Binutils , "H.J. Lu via Gdb-patches" Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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); } -- H.J.