Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD6E2C28B20 for ; Wed, 2 Apr 2025 10:28:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.935608.1336977 (Exim 4.92) (envelope-from ) id 1tzvKc-0003C6-I7; Wed, 02 Apr 2025 10:28:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 935608.1336977; Wed, 02 Apr 2025 10:28:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tzvKc-0003Bz-FU; Wed, 02 Apr 2025 10:28:26 +0000 Received: by outflank-mailman (input) for mailman id 935608; Wed, 02 Apr 2025 10:28:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tzvKa-0003Bt-QJ for xen-devel@lists.xenproject.org; Wed, 02 Apr 2025 10:28:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.96) (envelope-from ) id 1tzvKZ-007SMz-36; Wed, 02 Apr 2025 10:28:23 +0000 Received: from [2a02:8012:3a1:0:9928:c7aa:a3ed:1d45] by xenbits.xenproject.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tzvKZ-003gIi-2H; Wed, 02 Apr 2025 10:28:23 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=PKowBXBcB7HtZS8R1FiKtj/7DXSJMRMUvRrU/YRv5SY=; b=U1IM/xGY2hoCliET9G9uGEgQyY vy5vYN0d1z47aBTO9p8s4vT5F3jfv4Zm0Y+BbP+M6jOZQCccahCDe4NZ/W71D3rL/AkwFQ7SGaOxQ Gxgp+tWQ3wT7JGbwsFKZ44WzDVghYGDTfheiPnNyFaMN9LOT8P307hYjwiXp5hExyx10=; Message-ID: <72c9c91a-d536-42e1-9b7b-37375c2fb3e1@xen.org> Date: Wed, 2 Apr 2025 11:28:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 05/11] xen: remove -N from the linker command line Content-Language: en-GB To: Roger Pau Monne , xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Shawn Anastasio , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , Jan Beulich , Andrew Cooper References: <20250401130840.72119-1-roger.pau@citrix.com> <20250401130840.72119-6-roger.pau@citrix.com> From: Julien Grall In-Reply-To: <20250401130840.72119-6-roger.pau@citrix.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Roger, On 01/04/2025 14:08, Roger Pau Monne wrote: > It's unclear why -N is being used in the first place. It was added by > commit 4676bbf96dc8 back in 2002 without any justification. > > When building a PE image it's actually detrimental to forcefully set the > .text section as writable. The GNU LD man page contains the following > warning regarding the -N option: > >> Note: Although a writable text section is allowed for PE-COFF targets, it >> does not conform to the format specification published by Microsoft. > > Remove the usage of -N uniformly on all architectures, assuming that the > addition was simply done as a copy and paste of the original x86 linking > rune. > > Signed-off-by: Roger Pau Monné > Reviewed-by: Andrew Cooper > Reviewed-by: Oleksii Kurochko Acked-by: Julien Grall Cheers, -- Julien Grall