From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id EB43A3858416 for ; Fri, 4 Feb 2022 20:09:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB43A3858416 Received: by mail-pg1-x535.google.com with SMTP id d186so5888454pgc.9 for ; Fri, 04 Feb 2022 12:09:15 -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=sUQ2s6n8jTx5tLyoVPtw+d8+IR5yHwjwal+MTJb9byY=; b=pKaoxBivIgdBuVTT08BVtugkoRDT/XzBRDjXdzJOW05tfq5TeHJdawLpt0dsuxnrPe 3iEAi3YwtG0LCEPtMDyWQih+286XjqAILjfAWk++qCSuNGVd39MlGSJYShgp+4blpaqr 4DtIRYCORTryZtu2+gB9OlKTcZLb/15sSwTNVB3QYxsQfJBbq3vzsfKtuaoAQtzwCH4U wzGYgJbqXMc8JQiaEPqRE98o5zOPqk+HmR+8sluKk6uWU6DJWscN+29vfg0UB8dzAQqf lGlJcXoadFXEccOSflHXiRdvlcELlmMlR1SMULQ5ixbhmfFEwJdqft3vH5oAlSMZ67by H7BQ== X-Gm-Message-State: AOAM532zDN7w9vDs7+35aT6khLw1zNxELjNIBALdzmNldJjwRqYnyKGR Qb4uDx4RP3nNQiRxQPSrtqbj8Agz6uBnMgdMDHEyU22qgSQ= X-Google-Smtp-Source: ABdhPJx2I+Clc1kheCGIfHHpr/TSNinjcFQJZPQiZ+B7y4o6IG/MP23IUrDYc6nxqG5rORgLroV9syHzajMZ9fazRko= X-Received: by 2002:a63:f542:: with SMTP id e2mr509878pgk.381.1644005354930; Fri, 04 Feb 2022 12:09:14 -0800 (PST) MIME-Version: 1.0 References: <20220203180948.2744-1-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Fri, 4 Feb 2022 12:08:39 -0800 Message-ID: Subject: Re: [PATCH 0/7] Support DT_RELR relative relocation format To: Joseph Myers Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3021.0 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: Fri, 04 Feb 2022 20:09:18 -0000 On Fri, Feb 4, 2022 at 12:00 PM Joseph Myers wrote: > > 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 DT_RELR is enabled only if linker supports -z report-relative-reloc option which adds GLIBC_ABI_DT_RELR dependency in the linker output to prevent random crashes with the older glibc binaries. > 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 -- H.J.