From 2901506937de7fc294979d01a82eab5bbfd8ef7c Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Mon, 23 Sep 2013 10:22:48 -0400 Subject: [PATCH] Make SHIM_LOCK_GUID a first-class object with a symbol. Right now the CA is checking if shim builds expose a particular version of the shim protocol. To do this, they're looking for SHIM_LOCK_GUID's value in the resulting binary. Currently, with SHIM_LOCK_GUID as a macro that gets assigned to local variables, that means they have to compensate for mov instructions mixed in with the actual value. This is completely absurd, so promote it to a first-class object with a symbol to make it both easy to find and continuous. Signed-off-by: Peter Jones --- shim.c | 2 ++ shim.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shim.c b/shim.c index eaabefc..28e4da5 100644 --- a/shim.c +++ b/shim.c @@ -55,6 +55,8 @@ static void *load_options; static UINT32 load_options_size; static UINT8 verbose; +EFI_GUID SHIM_LOCK_GUID = { 0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23} }; + /* * The vendor certificate used for validating the second stage loader */ diff --git a/shim.h b/shim.h index 0819259..f7a766a 100644 --- a/shim.h +++ b/shim.h @@ -1,7 +1,6 @@ #include "PeImage.h" -#define SHIM_LOCK_GUID \ - { 0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23} } +extern EFI_GUID SHIM_LOCK_GUID; INTERFACE_DECL(_SHIM_LOCK);