x86/EFI: Fix detection of buildid

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.lagerwall@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Frediano Ziglio <frediano.ziglio@cloud.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
This commit is contained in:
Andrew Cooper committed 2025-07-29 17:25:54 +01:00
1 parent 385e2d929c
commit 32b63424e4
1 file changed
+5 -2
+5 -2
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.