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 5ED4E3858C27; Mon, 18 Oct 2021 19:46:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5ED4E3858C27 Received: by mail-pl1-x633.google.com with SMTP id y1so12002679plk.10; Mon, 18 Oct 2021 12:46:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cdTsCki+LON/iTBbzCf/Ng1qemuiEG5kWzHivOCH3Zk=; b=rTx5gjcLDz61eJz3fz708rR/i9qrw0CeKI73KkUCrO+bADN2aew8Z/3ZBtqnK5wB4z mAZqzXoc/Uph2r9ktBaeoFSvGDahkaa0IhbpkzF3PsVITLGeqDtHtXeDvpiJZakHgFdx Tfd+grpW7w42yL7DRHwHPfF/pbfrpKmu4yJ/3vaG/QTJUh7bFNaKh7//YNir+EkKEfoe eeoHuIc5RTOitqT0YFaJWfnpVXleeygbOO797gco5yUuNuaRtob8wjNrBxoTvRjtmVwW 2mJt8ztpUlVJloTG2DauGbV7dqyoS7ch3Tpquo/XCKWjF5svYKAmwk3IBP4iNlPqqi0u qtkg== X-Gm-Message-State: AOAM532uEEkhXgwU39BiZ74Mkw+x0qvJlHT28E10tfMo1QKaL3iwH8oE Nc8YqGd8De9Np3Bf19R5UR09h/5HnGxUMGjhSfY= X-Google-Smtp-Source: ABdhPJw/Sv5gJq4Sm+6d+hOP3IZN0fEpNsp91ThTQgNK1GGuYzU0OQ09WpgO4QWOLUh8t+H2dV7HPgXy4iCX9pJVao4= X-Received: by 2002:a17:90b:38c6:: with SMTP id nn6mr1102377pjb.28.1634586378547; Mon, 18 Oct 2021 12:46:18 -0700 (PDT) MIME-Version: 1.0 References: <20211017005020.2645717-1-maskray@google.com> In-Reply-To: From: "H.J. Lu" Date: Mon, 18 Oct 2021 12:45:42 -0700 Message-ID: Subject: Re: [PATCH v2] elf: Support DT_RELR relative relocation format [BZ #27924] To: Joseph Myers Cc: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= , GNU C Library , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.9 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, 18 Oct 2021 19:46:21 -0000 On Mon, Oct 18, 2021 at 12:22 PM Joseph Myers wrote: > > On Mon, 18 Oct 2021, H.J. Lu via Binutils wrote: > > > For Linux targets, we need the glibc version dependency for > > DT_RELR support at run-time. > > What we've supposedly previously done with new ELF features is use > EI_ABIVERSION (see libc-abis in glibc). > > That requires the static linker to compute the right ABI version based on > which of the relevant features is used by the generated binary (note that > the ordering of different features, and thus the numbers assigned to them > as well as which of them counts as the newest feature to be stored in > EI_ABIVERSION, is *not* the same across glibc architectures). I'm not > sure the binutils side of things was ever implemented on most > architectures, or that the checks in glibc get properly applied to all > relevant ELF objects (dynamic linker, main program, loaded shared > libraries), but in principle the mechanism exists and avoids the linker > needing to know about specific glibc version numbers itself (at the > expense of needing to know the per-architecture version numbers and > ordering for different ELF features). > We may use it if the existing ld.so implements the check. -- H.J.