From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 7BB5A38438A3 for ; Mon, 2 Aug 2021 20:44:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7BB5A38438A3 Received: by mail-pl1-x633.google.com with SMTP id u16so12553765ple.2 for ; Mon, 02 Aug 2021 13:44:08 -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=2ze26SYlkoMMdZ3Ch0PZoLi37hrHBbutpsBlWKci3h8=; b=PIMAoVP+8rk9HKDGbtgTWBIhCFuKEdNwetDVQd0iSAs8B8zxc1ikYKPG35BG/+BNab rLHYDGF/45fnHql5W2Ylfa+pQK28HeTDVU8H0dZixn1NINDcocBOYEl1wWZAUjM9Uelw qo5C1yYIFtVBjJTicNJYZApo+km1RdWhD15r2P1ZvyLSPvj6hmW+PEcVoE3dn/CqB2eD jnCSeiiF2eSVha1nlx5lON5qHg4IOBkgDYcmMFtydeKFT93jdBQ+VhhgU+cVbwCS68Oo n1RjPJvgE4J1lgmj7H93dVrOW/Zk7a/rHjFGkwaWUgqVQr9lEOBA0HvDs+cmXhhQF367 i/WA== X-Gm-Message-State: AOAM5337e/DQiBpjBoM4NXTiA1EbynXxOhXGkpHmHZ2qcijKIv91b+6E Xlx9Ij2HowFNSuQpkqIvRa9FWg6bDAHMnqRaQfdZUDFP X-Google-Smtp-Source: ABdhPJzBarfdj7JwiJ8r3UMZcpPLPmOa2a7dgtHYxJYOhH3PrcksGOcyBHtA9+5KNO0aFJ/8cPKt2xZoPByAr9eQlI4= X-Received: by 2002:a17:90a:62cb:: with SMTP id k11mr662985pjs.153.1627937047727; Mon, 02 Aug 2021 13:44:07 -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> In-Reply-To: <87h7g8ug94.fsf@igel.home> From: "H.J. Lu" Date: Mon, 2 Aug 2021 13:43:31 -0700 Message-ID: Subject: Re: [PATCH 2/2] ld.so: Hide _r_debug to support DT_DEBUG [BZ #28130] To: Andreas Schwab Cc: "H.J. Lu via Libc-alpha" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3025.5 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 20:44:09 -0000 On Mon, Aug 2, 2021 at 6:29 AM Andreas Schwab wrote: > > 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. > Removed from the v2 patch. -- H.J.