path: root/core/include
diff options
authorMatt Fleming <matt.fleming@intel.com>2013-06-19 13:44:25 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-06-19 14:26:19 +0100
commit9b8f1d3f3bfa72e8375c16137cc15eac579ed256 (patch)
tree5521ddefa88877ce3f5c4dc704edae2f4cdbce56 /core/include
parentdb25b06af0a4be7231a120d53b24cc01e17ed315 (diff)
efi: Mark global BIOS-only symbols as __weak
Unfortunately, there are still some references in generic code to symbols that only make sense under BIOS. Use the __weak tag to allow building for EFI without having to declare these symbols. Accessing these __weak symbols under EFI will generate an error at runtime, indicating to the user that they're executing a BIOS code path. The long-term solution is to move these BIOS-specific symbols into core/bios.c or somewhere equally BIOS-centric so that these symbols are no longer global. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core/include')
1 files changed, 10 insertions, 4 deletions
diff --git a/core/include/core.h b/core/include/core.h
index 1d20040a..3a63aac7 100644
--- a/core/include/core.h
+++ b/core/include/core.h
@@ -22,14 +22,20 @@ extern char CurrentDirName[];
extern char SubvolName[];
extern char ConfigName[];
extern char config_cwd[];
-extern char KernelName[];
extern char cmd_line[];
extern char ConfigFile[];
extern char syslinux_banner[];
extern char copyright_str[];
-extern uint16_t BIOSName;
-extern char StackBuf[];
-extern unsigned int __bcopyxx_len;
+ * Mark symbols that are only used by BIOS as __weak until we can move
+ * all references out of the generic (EFI + BIOS) code and into
+ * BIOS-specific code.
+ */
+extern __weak uint16_t BIOSName;
+extern __weak char KernelName[];
+extern __weak char StackBuf[];
+extern __weak unsigned int __bcopyxx_len;
extern uint8_t KbdMap[256];