From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id a4KcNZ0bGWEeZAAAWB0awg (envelope-from ) for ; Sun, 15 Aug 2021 09:50:21 -0400 Received: by simark.ca (Postfix, from userid 112) id C165B1EDFB; Sun, 15 Aug 2021 09:50:21 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED 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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 15FF71EA7E for ; Sun, 15 Aug 2021 09:50:21 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 718603864842 for ; Sun, 15 Aug 2021 13:50:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 718603864842 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629035420; bh=VRRdylokOgRkaN9nJ5IzJuk6pLyzhx4RwI99Uzex3cQ=; 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=M7qtMU0CTHsYnLCVMu7g7Hdp34wSiuDoTXWsv4fKnpEZkCNAGX+dUSR3fLAgt4F+z MSd2xsXla3lUsf1EUOQkReplY2QHPDP//SCzbCoXee9WmaQQzcn5gqUVJvrgzXYwoa O1X9cLYizfWItDXKwMGzN5PcR3MbmwDqlrJ8z15s= Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id D4DB63857C67; Sun, 15 Aug 2021 13:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D4DB63857C67 Received: by mail-pl1-x62e.google.com with SMTP id l11so17853090plk.6; Sun, 15 Aug 2021 06:48:57 -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=VRRdylokOgRkaN9nJ5IzJuk6pLyzhx4RwI99Uzex3cQ=; b=ZpGipTh6vlAY0eGfniqQRynbwY+8MfxZxkAoHadGC6N6jhxNWNg+BjpAaeS2D9SbZJ aKT1+j6Xxw+shQxy4fbaKeR7qCszgMtAgCA571O+tXDSLdlXYoBAc2PI/XI/CZaR3bqg EU7xpoBXErxzxvwz85/D+r1Hzl5v9HU3cINVHIYNvhvj3phNzVLH82isYDEngOlkZ14Z 5wcSP3d3jdH8qF5IMYvBt3rhNgtgP5oGzTRrbgaSTTFnkkdxZ8T7dbkgVIu3JciFPUPo MZ7+TKyb9TvvWRJfKUoNO7RJBDFgoLB/S/dyaLotI7wQRHn/cBPz+ghi/bu++TNCIlTc GcWQ== X-Gm-Message-State: AOAM530s5hAN2EewpCkjLv7WkvlUTAm1+W8n6UC8VDUQmgT0AEzJlbYS 2V5pJQR5r9Apj8fpt6QYI2OTfmy5lke0qTKjJaEA3PoJsZ8= X-Google-Smtp-Source: ABdhPJwfrCM62MPJgeTgC+mDLFjtWI5Sa9v+N2IXJ1hUpdYs92WuepYCOeEA3rph+dy2V2CLbcAkzJjduA9vWRfQJcY= X-Received: by 2002:a65:5b86:: with SMTP id i6mr11573142pgr.180.1629035337004; Sun, 15 Aug 2021 06:48:57 -0700 (PDT) MIME-Version: 1.0 References: <20210815002338.2779683-1-hjl.tools@gmail.com> <87a6lix6qe.fsf@mid.deneb.enyo.de> <875yw6x2y5.fsf@mid.deneb.enyo.de> In-Reply-To: <875yw6x2y5.fsf@mid.deneb.enyo.de> Date: Sun, 15 Aug 2021 06:48:21 -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 6:17 AM Florian Weimer wrote: > > * 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? When the warning happens, it won't read r_map. -- H.J.