From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> From: "H.J. Lu" 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 Cc: Andreas Schwab , "H.J. Lu via Libc-alpha" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3025.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 02 Aug 2021 21:47:38 -0000 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.