[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v10 1/2] Do not attempt to workaround older binutils


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Frediano Ziglio <frediano.ziglio@xxxxxxxxxx>
  • Date: Mon, 8 Dec 2025 13:39:42 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=au0EvkHErkBhFyp+np2g5Y4yKiCVAKiLNFKJGeXlVe8=; b=WmInhflzYmBaB/mDlpYd5UY76ceF/FFgcrCIh7DzzJmDim3ZKNEFZ8R6Y9icAM9b6JIWf9l7XAQL1IzbIrIvAyBUQ4rO3RJSeRxU7V4HpCEoCE61I+TuD+XI7tyU0Ua5CI1a83b8EIKcHlPj09aea1wTnVTlZVW9SoP48Xl/QkApxyWAHL2wn8krdAG6vw7sOOc2/aiBQkJpujyLfDtlwjZ4Pqg5krJBBs5pPDPIwLsHS4esPnEbB5jc85GpKHsfFEtWEcUa9PyMHn3R09D0QgAuY/F7eJWYSW48VznKo4QXeO2ka+lURRu1NnjiGR+wGmzpFI0IXjhY1dsPGoZh4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dornyFdXjOYGhhjI4NvVTIBemT3VWirMl+S8HYbnJpcEXVlSpc3Pctpg1Nn6I58xxl4Pf5CVruzZuJzPJX+o3r3VYVyKclMi5XMnrh5VbruJkcQT58B1BKSgD5xd7UILBMNgV+gsuKl62M3UuotwVv8Gl6s3N8ViKUHGT/GZGKoaBHL3tcJzyKpnvG1EKAlSZTp0YX+haBzwZR9nPV4n81brHeFAvjD60NbRPRLEt1I2JqciNgpd1ket4YijyeEPI1YWG1cFBl3SzpoBFuskywncdMbuAfhZT9SHjcRTnNPR0RMOCKHe4zJTFyRuzQNzYGAKj/zkrebKulVebByhiQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Frediano Ziglio <freddy77@xxxxxxxxx>, Demi Marie Obenour <demiobenour@xxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Mon, 08 Dec 2025 13:39:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>

Older binutils versions do not handle correctly PE files.
It looks like they could work if they don't produce debug information
but they mess the PE file in other way like putting invalid
flags in sections.
For instance they set IMAGE_SCN_LNK_NRELOC_OVFL flag which should be
set only if the number of relocations are more than 64K and not on
executable (while xen.efi is an executable).
Although some UEFI implementation do not check for these minor flags
we should not allow building not working artifacts.
Also different tools will complain about the format (like
objdump and strip).

Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
Changes since v9:
- explain one of the broken flags.
---
 xen/arch/x86/arch.mk | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk
index 16368a498b..10eb8e4292 100644
--- a/xen/arch/x86/arch.mk
+++ b/xen/arch/x86/arch.mk
@@ -88,13 +88,6 @@ EFI_LDFLAGS := $(patsubst -m%,-mi386pep,$(LDFLAGS)) 
--subsystem=10 --enable-long
 LD_PE_check_cmd = $(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o 
$(efi-check).efi $(efi-check).o)
 XEN_BUILD_PE := $(LD_PE_check_cmd)
 
-# If the above failed, it may be merely because of the linker not dealing well
-# with debug info. Try again with stripping it.
-ifeq ($(CONFIG_DEBUG_INFO)-$(XEN_BUILD_PE),y-n)
-EFI_LDFLAGS += --strip-debug
-XEN_BUILD_PE := $(LD_PE_check_cmd)
-endif
-
 ifeq ($(XEN_BUILD_PE),y)
 
 # Check if the linker produces fixups in PE by default
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.