summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2009-09-10 00:47:32 +0000
committerimp <imp@FreeBSD.org>2009-09-10 00:47:32 +0000
commitaae4779c1548fada270f9497fb6e4577ed4fe6dd (patch)
tree75d5c9f929c5429e6e98265d90b60812970a1dc7
parenta1f50d816c94bef07ae7052302b7f84a36b0276a (diff)
downloadFreeBSD-src-aae4779c1548fada270f9497fb6e4577ed4fe6dd.zip
FreeBSD-src-aae4779c1548fada270f9497fb6e4577ed4fe6dd.tar.gz
The boot loader is a FreeBSD a.out binary for x86, not a VAX binary.
Rather than writing out a MID of '0', write a MID of 0x86 (aka MID_I386) so that file gets it right. This is a nop for boot2. It just checks the MAGIC part of the field, ignoring the MID. boot2 is the only thing that loads this file, and only on x86 so the MID_i386 is always the right value (the rest of the code is already x86 specific). Reviewed by: bde@, jhb@ MFC after: 8.0 is out the door :)
-rw-r--r--usr.sbin/btxld/btxld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/btxld/btxld.c b/usr.sbin/btxld/btxld.c
index 43fa4a9..1102b5c 100644
--- a/usr.sbin/btxld/btxld.c
+++ b/usr.sbin/btxld/btxld.c
@@ -407,7 +407,7 @@ puthdr(int fd, struct hdr *hdr)
switch (hdr->fmt) {
case F_AOUT:
memset(&ex, 0, sizeof(ex));
- N_SETMAGIC(ex, ZMAGIC, MID_ZERO, 0);
+ N_SETMAGIC(ex, ZMAGIC, MID_I386, 0);
hdr->text = N_ALIGN(ex, hdr->text);
ex.a_text = htole32(hdr->text);
hdr->data = N_ALIGN(ex, hdr->data);
OpenPOWER on IntegriCloud