On Fri, Jun 27, 2025 at 02:08:00PM +0100, Frediano Ziglio wrote: > On Thu, Jun 5, 2025 at 12:17 PM Andrew Cooper <andrew.coop...@citrix.com> > wrote: > > > > The format of the buildid is a property of the binary, not a property of how > > it was loaded. This fixes buildid recognition when starting xen.efi from > > it's > > MB2 entrypoint. > > > > Suggested-by: Ross Lagerwall <ross.lagerw...@citrix.com> > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > > --- > > CC: Jan Beulich <jbeul...@suse.com> > > CC: Roger Pau Monné <roger....@citrix.com> > > CC: Ross Lagerwall <ross.lagerw...@citrix.com> > > CC: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> > > CC: Daniel P. Smith <dpsm...@apertussolutions.com> > > > > I don't like this patch and tried hard to do it in a better way, but the EFI > > aspects of the build system are too intractable. > > > > While on x86 I can in principle pull the same common-stubs.o trick, split on > > XEN_BUILD_PE rather than XEN_BUILD_EFI, that doesn't work on ARM which > > hand-codes it's PE-ness. Also, it's really not EFI related, other than as a > > consequence of that being the only reason we use PE32+ binaries.
Besides the ARM issue, it would also make it harder to follow different boot paths. > > > > Binutils 2.25 is now the minimum, and the makefiles can be cleaned up > > somewhat, but I need to backport this patch, internally at least. > > --- > > xen/common/version.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/xen/common/version.c b/xen/common/version.c > > index 5474b8e385be..56b51c81d2fc 100644 > > --- a/xen/common/version.c > > +++ b/xen/common/version.c > > @@ -203,8 +203,11 @@ void __init xen_build_init(void) > > rc = xen_build_id_check(n, sz, &build_id_p, &build_id_len); > > > > #ifdef CONFIG_X86 > > - /* Alternatively we may have a CodeView record from an EFI build. */ > > - if ( rc && efi_enabled(EFI_LOADER) ) > > + /* > > + * xen.efi built with a new enough toolchain will have a CodeView > > record, > > + * not an ELF note. > > + */ > > + if ( rc ) > > { > > const struct pe_external_debug_directory *dir = (const void *)n; > > > > Reviewed-by: Frediano Ziglio <frediano.zig...@cloud.com> > > I cannot see a better proposal in the discussion, but I prefer this > fixed than keep it broken. Yeah, I agree. Acked-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab
signature.asc
Description: PGP signature