From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by sourceware.org (Postfix) with ESMTPS id 97D703858D20 for ; Fri, 4 Feb 2022 20:32:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 97D703858D20 Received: by mail-pj1-x1033.google.com with SMTP id v15-20020a17090a4ecf00b001b82db48754so7165072pjl.2 for ; Fri, 04 Feb 2022 12:32:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kLKCNreAwj64ZSrOSAQiCoHd+QjLwPoyEmVgyV7CpZk=; b=SvOjmFWflgNopOI+u6ZMo3DvucUp1wRy0lS9bF8ZMdGBVMluObQrlt1mZU0gdbfuvr HNAes7AapVtQBN1VKmNxzIDTTAgriIf49jwWJIXw8B81qIIMGs4f4yDQ9znGFFfC8ohV 5uRyZVHuiB6Ktn1zOP/o9ogXaAbEx8yxlcuhCqYeZT1RzG82uKQfTd8v6zcEqf7T8DHg /wKpyBWPTflUQNo8kQ55VNg4zafnewGvnbrbUE8ahHWZIJPEzwdyz3jFmecDrn3MYptD os4UWjPvcoJJCUPYPAmWGc39EOPPhqD5yRNnu503syxPxWTXZKqd1xokJvSc/ucf7UX0 W74Q== X-Gm-Message-State: AOAM531UdSO6yda6i/xkOqhbYjkjFLmDpPR2fk+q0ayvVK62j0AouiET gmNJKFV4CRFCl+0SH9KGKM8J5SKVkbYcNw== X-Google-Smtp-Source: ABdhPJxIX1wKQTNQslk5PRDNoqfF7cjP87A/NLZhgW5eXeM1YJt9ma2oFQ2gdLm+TDFm6UgorHuVJQ== X-Received: by 2002:a17:903:18b:: with SMTP id z11mr4768933plg.59.1644006725459; Fri, 04 Feb 2022 12:32:05 -0800 (PST) Received: from google.com ([2620:15c:2ce:200:464:71b9:c580:3094]) by smtp.gmail.com with ESMTPSA id l2sm605083pju.52.2022.02.04.12.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 12:32:05 -0800 (PST) Date: Fri, 4 Feb 2022 12:32:00 -0800 From: Fangrui Song To: Joseph Myers Cc: "H.J. Lu" , libc-alpha@sourceware.org Subject: Re: [PATCH 0/7] Support DT_RELR relative relocation format Message-ID: <20220204203200.gksmxt2acrvukh6a@google.com> References: <20220203180948.2744-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-18.5 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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:32:08 -0000 On 2022-02-04, 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 >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). The patch series mix two things. "elf: Support DT_RELR relative relocation format [BZ #27924]" allows user programs to use DT_RELR. This is the main benefit. AIUI the other patches are to allow x86-64 libc.so.6 to be built with DT_RELR. This is more for dogfooding purposes and helps binutils port maintainers confirm their ld.bfd support handles some uncommon cases (glibc shared objects). The second part needs a https://sourceware.org/glibc/wiki/PortStatus entry. --- (Personally I'd prefer separate patches. But with some frustration on https://sourceware.org/pipermail/libc-alpha/2021-November/133009.html I don't care in what form glibc will get DT_RELR support... and I really appreciate that H.J contributed the ld.bfd support and drives this glibc effort. )