/** 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;