summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/interface/efi/efi_init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/interface/efi/efi_init.c b/src/interface/efi/efi_init.c
index cfaff606..ed9707f2 100644
--- a/src/interface/efi/efi_init.c
+++ b/src/interface/efi/efi_init.c
@@ -32,8 +32,14 @@ EFI_HANDLE efi_image_handle;
/** Loaded image protocol for this image */
EFI_LOADED_IMAGE_PROTOCOL *efi_loaded_image;
-/** System table passed to entry point */
-EFI_SYSTEM_TABLE *efi_systab;
+/** System table passed to entry point
+ *
+ * We construct the symbol name efi_systab via the PLATFORM macro.
+ * This ensures that the symbol is defined only in EFI builds, and so
+ * prevents EFI code from being incorrectly linked in to a non-EFI
+ * build.
+ */
+EFI_SYSTEM_TABLE * _C2 ( PLATFORM, _systab );
/** EFI shutdown is in progress */
int efi_shutdown_in_progress;