diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-05-16 10:16:17 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-05-16 11:01:55 +0100 |
commit | 2bd94fb6ed5f7f7472319cd6adaa25ccf9819230 (patch) | |
tree | 243d4733e1d319b5b0536eb4fc7a1383028c5219 /core | |
parent | 34eeaa3d747284fea6eb44ebc971cb513816cb5e (diff) | |
download | syslinux-2bd94fb6ed5f7f7472319cd6adaa25ccf9819230.tar.gz |
ldlinux: use platform filename extension
Users are starting to package all Syslinux versions on one boot medium
and are running into problems because all versions of ldlinux have the
same filename, ldlinux.c32. The version of ldlinux.c32 compiled for bios
will not work with efi32 or efi64, and vice versa. What we need is a way
for the Syslinux core to know exactly which filename to load.
Use the following extensions for the corresponding platforms,
.c32 - bios
.e32 - efi32
.e64 - efi64
Now all ldlinux variants can be kept in the same directory without
causing any conflicts.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/Makefile | 2 | ||||
-rw-r--r-- | core/elflink/load_env32.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/core/Makefile b/core/Makefile index 87cf44b4..eaf12443 100644 --- a/core/Makefile +++ b/core/Makefile @@ -97,7 +97,7 @@ NASMOPT += $(NASMDEBUG) PREPCORE = $(OBJ)/../lzo/prepcore -CFLAGS += -D__SYSLINUX_CORE__ -I$(objdir) +CFLAGS += -D__SYSLINUX_CORE__ -I$(objdir) -DLDLINUX=\"$(LDLINUX)\" # The DATE is set on the make command line when building binaries for # official release. Otherwise, substitute a hex string that is pretty much diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c index 5f797d67..470bd154 100644 --- a/core/elflink/load_env32.c +++ b/core/elflink/load_env32.c @@ -22,8 +22,6 @@ #include <sys/module.h> #include "common.h" -#define LDLINUX "ldlinux.c32" - extern char __dynstr_start[]; extern char __dynstr_end[], __dynsym_end[]; extern char __dynsym_start[]; @@ -66,7 +64,7 @@ again: if (rv == EEXIST) { /* * If a COM32 module calls execute() we may need to - * unload all the modules loaded since ldlinux.c32, + * unload all the modules loaded since ldlinux.*, * and restart initialisation. This is especially * important for config files. * @@ -159,7 +157,7 @@ void load_env32(com32sys_t * regs __unused) /* * search_dirs() sets the current working directory if * it successfully opens the file. Add the directory - * in which we found ldlinux.c32 to PATH. + * in which we found ldlinux.* to PATH. */ if (!core_getcwd(path, sizeof(path))) goto out; @@ -188,7 +186,8 @@ void load_env32(com32sys_t * regs __unused) out: free(PATH); - writestr("\nFailed to load ldlinux.c32"); + writestr("\nFailed to load "); + writestr(LDLINUX); } static const char *__cmdline; |