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.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 5DDF11F8C6 for ; Mon, 6 Sep 2021 06:30:57 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 21CE73839831 for ; Mon, 6 Sep 2021 06:30:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21CE73839831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1630909856; bh=QvUMPl8JNhOc1vW9VT7ypcjcflASZecFoqJNi60aB4c=; 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=TQrMyba4XkhPAY4qGC3hgBpMNDKQZ9inYFGKGDFwdVXICgXfIk445X0BNtDnwbrS8 flfDa7C7yEYTiPigpkGA/X3AXnVJccZUMJSLD5PubV5lr6u4AVqQV15oZzD4/OuEfg gxxfU5N6i3wG4INZOLzVk2qwu5i14sKY2wHpMh+k= Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by sourceware.org (Postfix) with ESMTPS id B6F953858C27 for ; Mon, 6 Sep 2021 06:30:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B6F953858C27 Received: by mail-yb1-xb30.google.com with SMTP id k65so11546970yba.13 for ; Sun, 05 Sep 2021 23:30:36 -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=QvUMPl8JNhOc1vW9VT7ypcjcflASZecFoqJNi60aB4c=; b=nBwdj6CY0U3BrydnrarXmYWd8k+54FRBLIYhyp6LyvIFILcwAkenSlAHDm8MsJYAKG MDFM6ldMBZIQGnLlb7BMD6EYIDyof59WZEGcPPAy+qiaE4QcrHs8vehQHYxB6UQfekxC s6kVix5T/9RTRPLNas0NDq65MPGuZMMIdgKgdHPWiW866A5hFLgKMzbqweCfJ2AGtStB lHn4sF398qbwAgfGWgQACLVRGCGcHMBNHnOWAOML14wSbtuj7630mbZhh3beQbKoN6rT a2WmJYBLvPFim2oFP3WqdDur0okXUn3NFYnWjJMIQ7uN3sn/Mkjh4cx8uBQvGBQorFb1 IkZg== X-Gm-Message-State: AOAM532EHJyh1rHO4i03StrBRr6U51RogqYuvWu32ddd07YrTisR8dDG 6MNKO/EEGf2tBALztQcux/lvwN7pcDAUXJov1ZZEEfLfR4y0kw== X-Google-Smtp-Source: ABdhPJxt2uz2yxD0udi3T1CStDDPA7gfjewgNzgS8XMS+gM01obuxZb9XBVox3z+Tr+ktJqAf/ViWiFfu6ic+STEkUs= X-Received: by 2002:a25:22c5:: with SMTP id i188mr14691712ybi.108.1630909836124; Sun, 05 Sep 2021 23:30:36 -0700 (PDT) MIME-Version: 1.0 References: <20210708221032.955550-1-maskray@google.com> <8b8fb5c9-ce4e-b10e-95b1-0281f96894c0@redhat.com> <20210713080646.3n3ycmh3p4d7ul3t@google.com> <11b630ce-8d50-ee07-37e9-b5fec16a6f18@gotplt.org> <20210713230639.mkyiijn6v7tlo7fc@google.com> In-Reply-To: Date: Sun, 5 Sep 2021 23:30:25 -0700 Message-ID: Subject: Re: [PATCH] csu: Skip ARCH_SETUP_IREL if _dl_relocate_static_pie applied IRELATIVE relocations [BZ #27164] To: Siddhesh Poyarekar 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: =?utf-8?q?F=C4=81ng-ru=C3=AC_S=C3=B2ng_via_Libc-alpha?= Reply-To: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Tue, Jul 13, 2021 at 7:15 PM Siddhesh Poyarekar wrote: > > On 7/14/21 4:36 AM, Fangrui Song wrote: > > Please see the sentence from the first message > > "In addition, this enables a future simplification to GNU ld: we can > > drop a linker script difference between -no-pie and -pie." > > > > This is the only difference other than image base difference. > > I did see the first message and indeed, all messages in the thread > before asking that question. Perhaps my wording wasn't specific enough: > what is the benefit to *users* of having those symbols in dynamic > binaries? If the only reason what you mentioned in your first email, > then this patch proposes to add runtime overhead to make what is > essentially a cosmetic difference to GNU ld. That doesn't make sense. > > In that context, lld behaviour needs to be changed since it adds symbols > specifically meant to enable ifunc resolution in non-pie static binaries > to all generated binaries without any known benefit to end user > applications. > > Siddhesh Circling back... Finally I conceded and changed LLD 13.0.0 to not define __rela_iplt_start/__rela_iplt_end for -pie, for the sake of users. For the record, Android bionic uses the same IRELATIVE code path for both static non-pie and static pie. They had to adapt to undefined __rela_iplt_start for static pie: https://r.android.com/1809796 I described this issue in detail in a chapter of https://maskray.me/blog/2021-09-05-build-glibc-with-lld