mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
385e2d929c
commit
32b63424e4
1 file changed
+5
-2
@@ -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;
|
||||
|
||||
|
||||