diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-06-19 13:44:25 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-06-19 14:26:19 +0100 |
commit | 9b8f1d3f3bfa72e8375c16137cc15eac579ed256 (patch) | |
tree | 5521ddefa88877ce3f5c4dc704edae2f4cdbce56 /core/include | |
parent | db25b06af0a4be7231a120d53b24cc01e17ed315 (diff) | |
download | syslinux-9b8f1d3f3bfa72e8375c16137cc15eac579ed256.tar.gz syslinux-9b8f1d3f3bfa72e8375c16137cc15eac579ed256.tar.xz syslinux-9b8f1d3f3bfa72e8375c16137cc15eac579ed256.zip |
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')
-rw-r--r-- | core/include/core.h | 14 |
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]; |