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 3963F1F8C6 for ; Sun, 15 Aug 2021 13:50:49 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 521AD3896C35 for ; Sun, 15 Aug 2021 13:50:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 521AD3896C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629035448; 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=J0tplDCGXs1Ye2YAcIrQaTAOrwvF+asecOP8Uy/MEUdM92Z4ta8HA330y5/x8R+te iOvdbnwWRfLkMoqbcMEFS3/FUNsXgE/caqb7HrefrsjIeCLqnH9mRze9PAqT8glR9S ivVAxoAOC8SfXzLOEJG656QbCRSue+4ANjZWx5zQ= 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: 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: GNU C Library , Binutils , "H.J. Lu via Gdb-patches" Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" 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.