From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 289B63858D20 for ; Fri, 4 Feb 2022 20:00:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 289B63858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: FIlnsMIo/5eQxyW+AWCC7PH75ggu9XfUdhXre5MmUZXbMPlQ04Oeu6AHob1n3eYm4+E799NGOy PkC1hIM7MNB4+7mlOQMlJOGtU52sp/jWm5Pdw1jYIAMt0ixC0tfinTcQucrlLDX2lU2FEhVMUJ Fzc8zM1LMySfKJoZncXjOk5ioTe7lx4pkNCCdM0xie31HNdpVaH31g5pl9BfU99I67Yp37Argy 9lFpHjbzPylGMuKWSO718aU1cUKHDm7PPb/z/lEtVt3rTy4Rm4jEAa5Qo8d4+T5kPkMEpvNpnC ynQZFuRncrPHNlVnqgzYt60B X-IronPort-AV: E=Sophos;i="5.88,343,1635235200"; d="scan'208";a="71577870" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 04 Feb 2022 12:00:38 -0800 IronPort-SDR: /eljbJgwgjsHL3P1y6N3RIZLDjTe3fyTjhXfaD9boO8wADeVxNzNBdi5WEdPr/ysnZq9cguecy YPNn5wEbWqlQpi7ZIQkcw1d0kMMxi0wgD+WVkaMDHwQjhY6qpdrjT9PGVi7mtBRK057EWCfzyG h3XZy/WdDbOw8PK8GFTnTBSQDWuQHAVSoirpewK7x4ASH1AVBAQahGEZzzYgYIpd0+KBlN2DjK uq49R/pFTn9cb3wW/JUlpVhrmk2x7NiQ0FLjW9OaM27ZVE24dPYjjMma3pfb9G/cBc7PRJelPR pHw= Date: Fri, 4 Feb 2022 20:00:33 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: "H.J. Lu" CC: Subject: Re: [PATCH 0/7] Support DT_RELR relative relocation format In-Reply-To: <20220203180948.2744-1-hjl.tools@gmail.com> Message-ID: References: <20220203180948.2744-1-hjl.tools@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3115.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Fri, 04 Feb 2022 20:00:42 -0000 On Thu, 3 Feb 2022, H.J. Lu via Libc-alpha wrote: > DT_RELR is enabled in glibc shared libraries and position independent > executables (PIE) automatically if linker supports -z pack-relative-relocs > nd the architecture defines SUPPORT_DT_RELR in config.h. At the moment, > only x86 targets define SUPPORT_DT_RELR. The patch 1 description says "This patch is simpler than Chrome OS's glibc patch and makes ELF_DYNAMIC_DO_RELR available to all ports.". What exactly would other architectures need to add in glibc to provide RELR support, since I don't see any actual architecture-specific code in this patch series outside of configure scripts? Please provide text you would propose to add to https://sourceware.org/glibc/wiki/PortStatus that gives an architecture maintainer all the information needed to add such support for their architecture. If in fact no architecture-specific code should be needed, please remove the SUPPORT_DT_RELR handling and just allow glibc to support the feature for all architectures (while using RELR in glibc itself for architectures where the linker support is present, as detected by a configure test on the linker rather than hardcoding information about which architectures have that linker support at a given time). The default should be to support a feature for all architectures. A patch series supporting a feature for only some architectures needs a positive reason for excluding other architectures (for example, that each architecture needs architecture-specific code, for which you provide suitable documentation to add to PortStatus to help architecture maintainers in writing such code). -- Joseph S. Myers joseph@codesourcery.com