From: Frediano Ziglio <frediano.ziglio@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Frediano Ziglio" <frediano.ziglio@cloud.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Frediano Ziglio" <freddy77@gmail.com>,
"Demi Marie Obenour" <demiobenour@gmail.com>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Stewart Hildebrand" <stewart.hildebrand@amd.com>,
"Oleksii Kurochko" <oleksii.kurochko@gmail.com>
Subject: [PATCH v10 1/2] Do not attempt to workaround older binutils
Date: Mon, 8 Dec 2025 13:39:42 +0000 [thread overview]
Message-ID: <20251208133945.61375-2-frediano.ziglio@citrix.com> (raw)
In-Reply-To: <20251208133945.61375-1-frediano.ziglio@citrix.com>
From: Frediano Ziglio <frediano.ziglio@cloud.com>
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@cloud.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
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
next prev parent reply other threads:[~2025-12-08 13:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 13:39 [PATCH v10 0/2] xen: Strip xen.efi by default Frediano Ziglio
2025-12-08 13:39 ` Frediano Ziglio [this message]
2025-12-08 13:56 ` [PATCH v10 1/2] Do not attempt to workaround older binutils Jan Beulich
2025-12-08 14:20 ` Frediano Ziglio
2025-12-08 13:39 ` [PATCH v10 2/2] xen: Strip xen.efi by default Frediano Ziglio
2026-05-05 21:10 ` Jason Andryuk
2026-05-05 21:28 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251208133945.61375-2-frediano.ziglio@citrix.com \
--to=frediano.ziglio@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=demiobenour@gmail.com \
--cc=freddy77@gmail.com \
--cc=frediano.ziglio@cloud.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=marmarek@invisiblethingslab.com \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=stewart.hildebrand@amd.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.