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=-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_HI,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 16F9A1F8C6 for ; Mon, 2 Aug 2021 21:47:57 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C7914388F02C for ; Mon, 2 Aug 2021 21:47:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C7914388F02C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627940875; bh=C0xLTK4F2p1W9wYJNwlaOrQEOcnIrf0z08CuXWh1bRw=; 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=lxCGsbjmh1akU7KO2SVcyaqgayz4TexBT3W3VZZ9fQAs5XqOdwNFe0FZ0SDRdJPp6 cD8UtgjL3qmo4El1HV8MOdsIOhW3HmvIiAaFJ99FOoY42BbUkk1OiMD3YeaEdo7MtU sOIBkkcr1Hc788kIy367ZedyUNfmnYEiTqSMzYp0= Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 5CFB73839408 for ; Mon, 2 Aug 2021 21:47:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5CFB73839408 Received: by mail-pj1-x1030.google.com with SMTP id g23-20020a17090a5797b02901765d605e14so1924555pji.5 for ; Mon, 02 Aug 2021 14:47:35 -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=C0xLTK4F2p1W9wYJNwlaOrQEOcnIrf0z08CuXWh1bRw=; b=YUiCg3+jHLaZcpiq7jULeekmIyPcp/GGfw7/BLO1WpjJMGYOLevxyJkZRqGOH8PUaw u5/6qO0GjI/6DJnKYdx6p1vDM+1neQ+giJ2SC9R/wlZhDCj66ImQRKOPHmc3vYvoMg/v kcmJ0BSORBjZ8JvEm9yGxdoMBe5v9gDZnwQqNyqmmojJD55ZnhL1nVQqzBST+pLHlajA LkUT9LIoTP5BN6SqqWev4Lsz1Mo113m8LQMJZKLHGK3yeLQr1RzLjkpaZpcV48n9Nifr GyZ2LTgG9JGrXpNGtlK8TgXQAeTjh1b4KjZkU/BxVD+6IUd6N+NSeBQxNW3xVSDB6bfa CfOw== X-Gm-Message-State: AOAM533MyPTyJUThd1VG1x+slFXvmXZksR7yzKf4l8d4rZ5TBFTrdbFu aA44fEd5SH5jj8bH6LRT27sfZYy3A/q9cgiF9qU= X-Google-Smtp-Source: ABdhPJxtpC7gA3z2fRPyT/c8myGdJRYd0cBqjN80iFS/WGbTy1O+cFPBLkcRyRY5M3WnHh5agyGBDB1C2jzr3tJ6FZY= X-Received: by 2002:a05:6a00:178f:b029:32b:2092:c3f5 with SMTP id s15-20020a056a00178fb029032b2092c3f5mr18313246pfg.57.1627940854483; Mon, 02 Aug 2021 14:47:34 -0700 (PDT) MIME-Version: 1.0 References: <20210802042940.932692-1-hjl.tools@gmail.com> <20210802042940.932692-2-hjl.tools@gmail.com> <87h7g8ug94.fsf@igel.home> <87o8afk0ie.fsf@oldenburg.str.redhat.com> In-Reply-To: <87o8afk0ie.fsf@oldenburg.str.redhat.com> Date: Mon, 2 Aug 2021 14:46:58 -0700 Message-ID: Subject: Re: [PATCH 2/2] ld.so: Hide _r_debug to support DT_DEBUG [BZ #28130] 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: "H.J. Lu via Libc-alpha" , Andreas Schwab Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Mon, Aug 2, 2021 at 2:20 PM Florian Weimer via Libc-alpha wrote: > > * Andreas Schwab: > > > On Aug 01 2021, H.J. Lu via Libc-alpha wrote: > > > >> 1. Add a function, __r_debug_location, which returns the address of > >> _r_debug: > >> > >> /* Return the address of that structure used by the dynamic linker. */ > >> extern struct r_debug * __r_debug_location (void) __attribute_const__; > >> > >> It has a special glibc version, GLIBC_DEBUG. > >> > >> 2. Hide _r_debug in ld.so by defining _r_debug with __r_debug_location: > >> > >> #define _r_debug (*__r_debug_location ()) > > > > There is no need for that. Nobody should be using _r_debug. > > It's declared in a public header. GNAT and Spindle use it. Maybe this It is wrong to use it to begin with. > needs to be deprecated first before it can be removed. My v2 patch includes an alternative in libsupport. -- H.J.