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=-3.9 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 [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 288031F403 for ; Thu, 6 Oct 2022 19:53:56 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="GrlJvOhL"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21EED3858D37 for ; Thu, 6 Oct 2022 19:53:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21EED3858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665086034; bh=T/23uTBH8YB5FMIpyAtEk1KHTFv8kDqhtUKtv7476rU=; 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=GrlJvOhL95g9CQ4v5p1yUsXR9wgtCs/QlMq93gM//KOyPCtxTL165sJlId+I4bwHF Wur3yRsr9GmGb1Bv/CqSYvRJXR6jGnnMy44GgOrAKNtpovR+HpbRzv5vG3gRlex7J6 dMAq8GkTUEUrD8VOJws/Ebrv6l2lWC4xXzxG8B4E= Received: from mail-oa1-x2c.google.com (mail-oa1-x2c.google.com [IPv6:2001:4860:4864:20::2c]) by sourceware.org (Postfix) with ESMTPS id 4FEEE3858D37 for ; Thu, 6 Oct 2022 19:53:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4FEEE3858D37 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-131ea99262dso3405572fac.9 for ; Thu, 06 Oct 2022 12:53:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T/23uTBH8YB5FMIpyAtEk1KHTFv8kDqhtUKtv7476rU=; b=RkUU8CqW3PU2ELINds6nf026Y7614SiKic2U5d2p87AGm5vhZ3sCJ6BXSQgJXLpIg6 nKfRG0auJ+rzwC1LZyywKUHnixk1kmEMnKawMztkrEX7t3OZ1qQi3IOAUlzH2JKkyeq3 NOYOjqM7xA/6x7/+xM0E/kW6au6iGeaG9lz5jNi4rhKm/Jmsd/VamMuNRmq9e9rrpGW9 cUtBBLwOempr6sWoPTh8b+PtA+RV8RNotYkdzJSsQ6wYWsgnTPKFsByC5YLtDDrnZVRa 7aEOyKsSV4j/Nyr8oLY43pTPW2yH7vLLYzcekbeVa5rfDFqqDDUa4K0Lsrvi9n3ibIu6 IDxQ== X-Gm-Message-State: ACrzQf2vp6gqmP/ph2adc1M1BFMmORumA8ujP4IJ2thZLU1/TPpWtYMg 3ZIsF8czXNlIWm0QmBdUCwDezCIJU3U6KW858aw= X-Google-Smtp-Source: AMsMyM7817ucTx5AV3FG1tiX6m8sQRt51DwbFjWIbOKuvpR2pscVFADPxXWzHbQtiTbjr9PcNx8EUuCIJVIOa0uySTA= X-Received: by 2002:a05:6870:c387:b0:12a:f227:c36 with SMTP id g7-20020a056870c38700b0012af2270c36mr796668oao.94.1665086013443; Thu, 06 Oct 2022 12:53:33 -0700 (PDT) MIME-Version: 1.0 References: <20210802042940.932692-1-hjl.tools@gmail.com> In-Reply-To: Date: Thu, 6 Oct 2022 12:52:57 -0700 Message-ID: Subject: Re: [PATCH 1/2] Map ABI/VERSION of rtld to ABI/VERSION of ld [BZ #28132] To: "Carlos O'Donell" 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: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Thu, Oct 6, 2022 at 11:46 AM H.J. Lu wrote: > > On Thu, Oct 6, 2022 at 9:39 AM Carlos O'Donell wrote: > > > > On Sun, Aug 01, 2021 at 09:29:39PM -0700, H.J. Lu via Libc-alpha wrote: > > > Since the module name of ld is rtld, map ABI/VERSION of rtld to ABI/VERSION > > > of ld. This fixes BZ #28132. > > > > Reviewing old patches that are still outstanding as part of the queue > > review in patchwork. Hopefully we catch up to the point where I'm not > > reviewing year old patches in the queue. However, some of these patches > > are interesting and valuable so I'm reviving them to review potential > > solutions. > > > > In scripts/gen-libc-modules.awk we have this code: > > 21 if (name == "ld") > > 22 name = "rtld" > > > > This means we are already handling this processing in other places. A > > clean solution needs to consider: > > > > scripts/abi-version.awk (no changes, should just use rtld) > > scripts/gen-libc-modules.awk (ld vs rtld) > > shlib-versions (ld=...) > > > > It feels like we need to refactor from the top just use rtld everywhere > > we accidentally used ld as our identifier. > > Since LD_SO is defined in lib-names.h, change ld.so to rtld.so requires > scripts/lib-names.awk change. It is a much bigger and messy change. > We change all internal usages to rtld by diff --git a/elf/dl-compat.c b/elf/dl-compat.c index 05c986a8be..6691ad1cc9 100644 --- a/elf/dl-compat.c +++ b/elf/dl-compat.c @@ -22,7 +22,7 @@ /* The GLIBC_2.35 symbol version is present naturally for later ports. Use OTHER_SHLIB_COMPAT because the module is called rtld, but the ABI version uses ld. */ -#if OTHER_SHLIB_COMPAT (ld, GLIBC_2_0, GLIBC_2_35) +#if OTHER_SHLIB_COMPAT (rtld, GLIBC_2_0, GLIBC_2_35) void attribute_compat_text_section __attribute_used__ @@ -30,6 +30,6 @@ __rtld_version_placeholder_1 (void) { } -compat_symbol (ld, __rtld_version_placeholder_1, +compat_symbol (rtld, __rtld_version_placeholder_1, __rtld_version_placeholder, GLIBC_2_34); #endif diff --git a/scripts/abi-versions.awk b/scripts/abi-versions.awk index c369793459..5d229b2977 100644 --- a/scripts/abi-versions.awk +++ b/scripts/abi-versions.awk @@ -25,6 +25,8 @@ $2 == "=" { gsub(/[^A-Za-z0-9_ ]/, "_"); oldid = $1; newid = $3; + if (libid == "ld") + libid = "rtld"; printf "#define ABI_%s_%s\tABI_%s_%s\n", libid, oldid, libid, newid; printf "#define VERSION_%s_%s\t%s\n", libid, oldid, new; @@ -36,6 +38,8 @@ $2 == "=" { gsub(/[^A-Za-z0-9_ ]/, "_"); versid = $1; + if (libid == "ld") + libid = "rtld"; printf "#define ABI_%s_%s\t%d\t/* support %s */\n", libid, versid, ++n, vers; printf "#define VERSION_%s_%s\t%s\n", libid, versid, vers; next; -- H.J.