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 0819E1F8C6 for ; Tue, 3 Aug 2021 18:24:37 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0916C3969827 for ; Tue, 3 Aug 2021 18:24:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0916C3969827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628015076; bh=5r70FViGVFbRwoj9VwNZeKVj+DxAtOMWFJYtNvp8YJs=; 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=bjns/mmUhbDQBxzOgxvu/r1Z8+95uL/oPV9aVfMiT74mGIop4ApUeTJryeJ9rqsza WJrVv742BlMFkGsGkC2wcm5LLpTKd4t3YBiZA1P1S6myaLXxi2WENtaTWrWIHu10SF kpzxZ/QlFHHr4suO4l5qSx6Z5UY8bELDVnJzLYCk= Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 1528138515FB for ; Tue, 3 Aug 2021 18:24:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1528138515FB Received: by mail-pl1-x62d.google.com with SMTP id u16so105868ple.2 for ; Tue, 03 Aug 2021 11:24:16 -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:content-transfer-encoding; bh=5r70FViGVFbRwoj9VwNZeKVj+DxAtOMWFJYtNvp8YJs=; b=tKSNu2TlDBAYzwAf3d9ytQGcoq+Mu4CS4DSQs6NVhEtKc+ZN5VuFTqsmsOqLRFggCa d2lWMC+SKmTri/bkd26At04oZkzKKcmK12YfsVJXKaVcYDOT5CbYr5xMNZNUwwUasFSU oo22mOFvwbbq43IilcvzLcst/BHlaYFe/bHswHBBU3pJjWrSSoht3L0SaAgZXZ42r9jU wmV7asKP8BrUNCBH2A5nskK8nFlefXE/UGQlxMa1M4PuzPrxm+8DfGiLmqKFbBP1yKc/ TeTTGGrszSHMks5Jd5rEiTWAb3qUUM4BVZ0sXXd9lzXGrZWG/UG5r5ROU327LkKBrRIC VF+A== X-Gm-Message-State: AOAM530euNCFdCj6jUXS5eTGu2K539uXAksomYnYJo7pVxlTgJU2PfWx OQ8gNl/CaoZL431+bV8tiDa1S1k9OIoc/qufNzU= X-Google-Smtp-Source: ABdhPJygR/t5qs/lfzfl4BcMQvuEIWHErROVIshaDGqa+eTu79VSm+NnqLjL1brogQFsz7bQAaOE/WCgv68hJdCWKPg= X-Received: by 2002:a17:90a:62cb:: with SMTP id k11mr5581500pjs.153.1628015055194; Tue, 03 Aug 2021 11:24:15 -0700 (PDT) MIME-Version: 1.0 References: <20210727173958.GB1633923@zorba> <20210728154408.GF1633923@zorba> <20210728190211.GJ1633923@zorba> <87o8agto7v.fsf@oldenburg.str.redhat.com> <20210803163917.GU1633923@zorba> <87mtpyfldl.fsf@oldenburg.str.redhat.com> In-Reply-To: <87mtpyfldl.fsf@oldenburg.str.redhat.com> Date: Tue, 3 Aug 2021 11:23:39 -0700 Message-ID: Subject: Re: RFC: Add DT_GNU_DEBUG To: Florian Weimer Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 , "Metzger, Markus T" , Jeremy Stenglein , "xe-linux-external\(mailer list\)" Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Tue, Aug 3, 2021 at 11:12 AM Florian Weimer wrote: > > * Daniel Walker: > > > On Mon, Aug 02, 2021 at 06:10:55AM -0700, H.J. Lu wrote: > >> On Sun, Aug 1, 2021 at 10:22 PM Florian Weimer wr= ote: > >> > > >> > * H. J. Lu: > >> > > >> > > On Wed, Jul 28, 2021 at 1:04 PM H.J. Lu wrot= e: > >> > >> > Do you want to drive this, or should I ? It looks like you know= the people > >> > >> > involved better than I do. > >> > >> > > >> > >> > >> > >> https://groups.google.com/g/generic-abi/c/1ngxmSwrafc > >> > >> > >> > > > >> > > I don't think the gABI community is interested in a new debug dyna= mic > >> > > tag. I propose DT_GNU_DEBUG: > >> > > > >> > > #define DT_GNU_DEBUG 0x6ffffff8 > >> > > > >> > > for the address of a pointer which will be filled by the dynamic > >> > > linker. Linker should > >> > > add the DT_GNU_DEBUG entry to executable's dynamic section. > >> > > > >> > > BTW, we have a choice. DT_GNU_DEBUG can be readonly or readonly a= fter > >> > > relocation, like DT_DEBUG. > >> > > >> > What about adding DT_DEBUG_SIZE, specifying the size of the data poi= nted > >> > to by DT_DEBUG? > >> > >> It works if we don't need to support static executables. > >> > >> > Perhaps the gABI folks are interested in that, too? I think it's wo= rth > >> > a try. If the answer is =E2=80=9Cno=E2=80=9D, we can still add DT_G= NU_DEBUG_SIZE to the > >> > GNU ABI. > >> > >> I did. I didn't get any feedback. > > > > So no feedback equal "not interested" ? > > I think the issue is that the struct already has a version field. > > It's only a problem for us because we have architectures with copy > relocations *and* have exposed _r_debug as a public symbol. However, we > can do what we did for _sys_errlist in the past (new symbol versions for > each size change), so it's not a real blocker. No, copy relocation doesn't work: https://sourceware.org/bugzilla/show_bug.cgi?id=3D28130 I want to get rid of copy relocation and keep _r_debug only for existing broken binaries. The new interface will provide an access function to get the address of internal data in ld.so. > I suppose the easiest way forward would be to grow _r_debug this way, > bump the version field past Solaris' version, add the Solaris members > (possibly with dummy values), and add our own new stuff afterwards. > > Thanks, > Florian > --=20 H.J.