From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id A2F943858006 for ; Sat, 5 Feb 2022 17:25:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A2F943858006 Received: by mail-pg1-x52d.google.com with SMTP id z131so7772114pgz.12 for ; Sat, 05 Feb 2022 09:25:08 -0800 (PST) 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=N4dIw2H2TbmzfVsA4qxoTNRJOXiKQm/xNzLvRbVxHN8=; b=X2EEVIMrwofqtPr4qpi/ysyW35tXyQmGpVsz3xe6bvurAgIak5FFgc+QHuRG9c38AL u7uEd0oMGm2i/QnuSpiuSIyA8Wbwgebj416CjalAu1vfWlfE+OLfVaw9qzoN0Jk19rwt Ed0F6d3eQ8ivo0FyJt/KEnF6fc51pa1Gev57haM9KN1/jZOqQBn+vgehf4dDB/Yw4emi eMHVMGllD8jDsSChbBkCuJBL89GyAl6kc2TiQ6X7zlNUFXRu8/uZ2M1NVyzWrRjAbmBG zd8vEzwBIB3imSCgdFc+OCY2A80qoVB5tt6KM1sEkXuC9TTZI0Wih/Bt+XaZgI1WXQxT quvw== X-Gm-Message-State: AOAM532+2iu8w3rg4BBjLiInJA2F3QPpk7eq4gb+cjS4WJBChgyZ1UPa V8dd6nlhggepHTbAnrmey/58yLzuEdjLuf4C0xq6e86j X-Google-Smtp-Source: ABdhPJy5S+669xLtdosv1mKXOBEgiH3AwfZ6VNHZvBxp7+cCkYgf6Hw4FtvnXw3gh5Aq4acFhF83fJmx7yzdcwPOvI8= X-Received: by 2002:aa7:888b:: with SMTP id z11mr8622049pfe.76.1644081907764; Sat, 05 Feb 2022 09:25:07 -0800 (PST) MIME-Version: 1.0 References: <20220203180948.2744-1-hjl.tools@gmail.com> <20220203180948.2744-4-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Sat, 5 Feb 2022 09:24:31 -0800 Message-ID: Subject: Re: [PATCH 3/7] Add GLIBC_ABI_DT_RELR for DT_RELR support To: Joseph Myers Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3021.1 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, T_SCC_BODY_TEXT_LINE 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: Sat, 05 Feb 2022 17:25:09 -0000 On Fri, Feb 4, 2022 at 3:58 PM Joseph Myers wrote: > > On Fri, 4 Feb 2022, H.J. Lu via Libc-alpha wrote: > > > On Fri, Feb 4, 2022 at 1:01 PM Joseph Myers wrote: > > > > > > On Fri, 4 Feb 2022, H.J. Lu via Libc-alpha wrote: > > > > > > > Good point. How about "enable DT_RELR only if SUPPORT_DT_RELR is > > > > defined? Currently, only x86 defines SUPPORT_DT_RELR. > > > > > > My preference would be: > > > > > > 1. Support user executables and shared libraries with RELR relocations > > > across all platforms, unconditionally. > > > > RELR is kind of like static PIE. Not all architectures support it. > > My understanding is that analogy only applies to the static linker, not to > glibc itself - that the static linker needs architecture-specific code, > but glibc doesn't (as evidenced by the lack of any architecture-specific > non-configure changes in this patch series). > > > RELR should be enabled only if there is a linker which supports > > -z pack-relative-relocs. > > (a) That should only apply to "enabled" in the sense of "glibc itself uses > RELR relocations", not "glibc supports loading executables and shared > libraries with such relocations". > > (b) The configure test for that should be architecture-independent, with > no architecture-specific configure changes needed at all. > Fixed in the v2 patch. -- H.J.