diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-05-03 15:11:10 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-05-03 15:11:10 -0700 |
commit | c2bd46bfc2eddc9bea70edadd203b257527e3583 (patch) | |
tree | edaf31707287ad6881355e88700c476952ae9888 /com32/mboot/map.c | |
parent | c8b2b33b46b3384fe1ebbeb1e38475f44c0fdfcf (diff) | |
download | syslinux-c2bd46bfc2eddc9bea70edadd203b257527e3583.tar.gz syslinux-c2bd46bfc2eddc9bea70edadd203b257527e3583.tar.xz syslinux-c2bd46bfc2eddc9bea70edadd203b257527e3583.zip |
mboot.c32: autodetect Solaris
Autodetect Solaris kernels (based on the ELF header OSABI field) and
use the Solaris workarounds in that case.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'com32/mboot/map.c')
-rw-r--r-- | com32/mboot/map.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/com32/mboot/map.c b/com32/mboot/map.c index a32f9b3b..267e50c8 100644 --- a/com32/mboot/map.c +++ b/com32/mboot/map.c @@ -151,6 +151,10 @@ struct multiboot_header *map_image(void *ptr, size_t len) !eh->e_phnum || eh->e_phoff + eh->e_phentsize * eh->e_phnum > len) eh = NULL; /* No valid ELF header found */ + /* Is this a Solaris kernel? */ + if (!set.solaris && eh && kernel_is_solaris(eh)) + opt.solaris = true; + /* * Note: the Multiboot Specification implies that AOUT_KLUDGE should * have precedence over the ELF header. However, Grub disagrees, and |