All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Frediano Ziglio" <freddy77@gmail.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Frediano Ziglio" <frediano.ziglio@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Teddy Astie" <teddy.astie@vates.tech>,
	"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	"Daniel P . Smith" <dpsmith@apertussolutions.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH for-4.22] xen/x86: Always strip xen.efi
Date: Wed, 17 Jun 2026 14:07:38 +0200	[thread overview]
Message-ID: <ajKOChA5NFFnytEq@mail-itl> (raw)
In-Reply-To: <274b06b5-88b0-4a40-9af4-4ad80a99f3b5@suse.com>

[-- Attachment #1: Type: text/plain, Size: 2495 bytes --]

On Wed, Jun 17, 2026 at 01:55:59PM +0200, Jan Beulich wrote:
> On 16.06.2026 16:28, Frediano Ziglio wrote:
> > On Tue, 16 Jun 2026 at 15:15, Jan Beulich <jbeulich@suse.com> wrote:
> >>
> >> On 16.06.2026 16:07, Frediano Ziglio wrote:
> >>> On Thu, 11 Jun 2026 at 15:42, Jan Beulich <jbeulich@suse.com> wrote:
> >>>>
> >>>> On 11.06.2026 16:38, Jan Beulich wrote:
> >>>>> On 08.06.2026 19:31, Andrew Cooper wrote:
> >>>>>> Some old versions of binutils ld managed to produce efi files which the
> >>>>>> matching version of strip couldn't process.  This includes Binutils 2.26
> >>>>>> included in Ubuntu 16.04.  Delete the workaround for this bug, and require a
> >>>>>> less broken toolchain.
> >>>>>
> >>>>> And we're certain newer versions of strip don't do any harm to the binaries?
> >>>>> Already towards Frediano's posting I said that having looked at how things
> >>>>> work there, I'm far from certain.
> >>>>
> >>>> I should have added: An option may be to link twice: Once with debug info
> >>>> included, and once with it stripped. Personally I trust the linker creating
> >>>> the various headers, including the section ones, more than strip's (or
> >>>> objcopy's). Yet then I can only repeat my observation that linking PE+ from
> >>>> ELF inputs looks to be significantly slower than linking ELF -> ELF.
> >>>
> >>> That was also attempted. See previous versions. And no, it does not work.
> >>
> >> How exactly does it not work? When stripping debug info while linking (as
> >> we now do for the first two passes), the resulting image should be both
> >> small enough and correct. What am I missing? The only caveat I'm aware of
> >> is the Eclair scan, where we should avoid doing any work for the
> >> "auxiliary" linking step (the one not producing the binary that's actually
> >> going to be used for running Xen).
> > 
> > One thing I remember was the build-id was not the same and debugging
> > tools could not work.
> 
> Hmm, yes, that's a little ugly, but can likely be dealt with by using
> --build-id=0x<hexdigits> to replicate the build-id that was generated for
> the main binary.

IMO linking twice (with and without debug symbols) has a great risk
potential of producing different layout of the binary. While arguably it
would be a bug in the build scripts, it doesn't matter with strip
approach (used by virtually every other project I've seen).

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-06-17 12:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 17:31 [PATCH for-4.22] xen/x86: Always strip xen.efi Andrew Cooper
2026-06-08 20:01 ` Marek Marczykowski-Górecki
2026-06-09 16:56   ` Andrew Cooper
2026-06-10  9:19     ` Marek Marczykowski-Górecki
2026-06-09  7:29 ` Oleksii Kurochko
2026-06-09 16:30 ` Roger Pau Monné
2026-06-09 17:05   ` Andrew Cooper
2026-06-10  7:31 ` Roger Pau Monné
2026-06-11 14:38 ` Jan Beulich
2026-06-11 14:42   ` Jan Beulich
2026-06-16 14:07     ` Frediano Ziglio
2026-06-16 14:15       ` Jan Beulich
2026-06-16 14:28         ` Frediano Ziglio
2026-06-16 14:41           ` Frediano Ziglio
2026-06-17 11:55           ` Jan Beulich
2026-06-17 12:07             ` Marek Marczykowski-Górecki [this message]
2026-06-17 12:09               ` Jan Beulich
2026-06-16  8:37   ` Jan Beulich
2026-06-16 14:15   ` Frediano Ziglio

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=ajKOChA5NFFnytEq@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=freddy77@gmail.com \
    --cc=frediano.ziglio@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=teddy.astie@vates.tech \
    --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.