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

Re: [PATCH 3/6] x86/efi: discard .text.header for PE binary


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Frediano Ziglio <freddy77@xxxxxxxxx>
  • Date: Thu, 4 Jun 2026 11:28:11 +0100
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pVMffWJhnWDz4y1GENHFYlmJvvLBHHDrwJFHR3wzWZ8=; fh=aTOqydVVH61A9fLIqtSJso3dR9MO//odNcGAaUB9/kQ=; b=dqGoiR/mHBiJS7X/B37Q2nZicdxhjNDRNjBb1h8vA+tWtzuAZ2Q4aR623XDqMD9Ulx 6leTt6NQLOJew9syGe/WL3QkxHdO1zMsA2JcwmpkDP60cQvptH+5gxRCNFbrsRNf01Pr 5cPjRIbr7PQpSKHDzcoTLTO6i7f0JN8YAQ1YBc7qIZ/+UDrpv69xtx7FS3UpuwPoTxpL KCN24s4sa94HIZwKV6rQOi6u3q5vCZ8dfQJs0y/9Hl6VuX5/mul/V6vLLHstUovib72C ksGUe0lwEqssSG6pU1LBGgEbb23WpE5N7aNMx1DNBRYV6trAFe5yG68MkLLGuHRu6G+f fL7A==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1780568902; cv=none; d=google.com; s=arc-20240605; b=HFXgQ93rrQb4KmWotQTVMPr5JV0NwagbAvkOlEW4kvRVd61c1iZiAJ8+us31+XERjM dyPExyGTW70wVbduZwTLk4eN3cuTGwsXNXFumll96Z8FDi1z+5acR0daS7oXeJzm3d6s Pw/eFWMF0PKiED6yPQTWBEawsvA75BRyvoO7RfiTXRZdLeFppTzRDjOmSXWh5y8j702z Oc/UhslU1OJBbiIws+7Vf78BLO3BmN3VSC/a8CSU9fjhXyJG6UMya/f3+71w+3WZFIjz FAM2H8VLt+bDcMynE7ZY0rVfyJek6HBal/pg9y0bPVFbT2cH9ROqM/uWrmneWZsId9a+ P7Mw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 04 Jun 2026 10:28:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, 2 Jun 2026 at 13:15, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 29.05.2026 17:35, Frediano Ziglio wrote:
> > From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> >
> > The multiboot headers are not consumed in the PE binary, hence discard them
> > in the linker script when doing a PE build.
>
> Yet weren't there plans to allow making use of those headers even in xen.efi?
>

That method was replaced by different ways of loading. Using multiboot
for PE would require some extensions to multiboot as the protocol is
not designed to support PE format. There are already ways to use EFI
and configuration files that can be used. We (as Citrix) are going
(not me personally) to post changes to extend xen_hypervisor and
xen_module (used currently only by ARM) to x64. These changes are much
smaller, maintainable and coherent.

> > That removes some relocations that otherwise appear due to the usage of the
> > start and __efi64_mb2_start symbols in the multiboot2 header.
> >
> > No functional change intended.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> > ---
> >  xen/arch/x86/xen.lds.S | 3 +++
> >  1 file changed, 3 insertions(+)
>
> This is lacking your own S-o-b.
>
> > --- a/xen/arch/x86/xen.lds.S
> > +++ b/xen/arch/x86/xen.lds.S
> > @@ -57,6 +57,9 @@ SECTIONS
> >    __image_base__ = .;
> >  #else
> >    . = __image_base__;
> > +  /DISCARD/ : {
> > +    *(.text.header)
> > +  }
> >  #endif
>
> We already have DISCARD_SECTIONS, so I think it needs clarifying why that
> can't be used / extended.
>

Yes, this can be done that way. Roger, do you agree on this ?

> Jan

Frediano



 


Rackspace

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