aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot/map.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-26 19:52:39 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-26 19:54:54 -0700
commit619579f87baddecc8601281215f878b57faa0f67 (patch)
tree271d1aa46a67d36891c1abb6b0f2184c44f0f321 /com32/mboot/map.c
parente57c9da3f1b4d8426f68b8fb0c1b6ebcf0b43bda (diff)
downloadsyslinux-619579f87baddecc8601281215f878b57faa0f67.tar.gz
syslinux-619579f87baddecc8601281215f878b57faa0f67.tar.xz
syslinux-619579f87baddecc8601281215f878b57faa0f67.zip
mboot: reimplement the Solaris DHCP hack, add compliant a.out modesyslinux-3.80-pre1
Reimplement the Solaris DHCP information passing hack. Add a spec-compliant mode for the "a.out kludge". The spec is pretty clear that the bit should override the ELF header (after all, otherwise there wouldn't be any need for the bit), but Grub disagrees. We default to Grub-compliant mode, as Solaris seems to set the bit even though it's an ELF kernel, but add the option to enable spec-compliant mode, as apparently some versions of FreeBSD need it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/mboot/map.c')
-rw-r--r--com32/mboot/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/mboot/map.c b/com32/mboot/map.c
index b134a558..bdfcfcf0 100644
--- a/com32/mboot/map.c
+++ b/com32/mboot/map.c
@@ -157,7 +157,7 @@ int map_image(void *ptr, size_t len)
* This is insane, since it makes the AOUT_KLUDGE bit functionally
* useless, but at least Solaris apparently depends on this behavior.
*/
- if (eh) {
+ if (eh && !(opt.aout && mbh_len && (mbh->flags & MULTIBOOT_AOUT_KLUDGE))) {
regs.eip = eh->e_entry;
ph = (Elf32_Phdr *)(cptr+eh->e_phoff);