From owner-svn-src-all@FreeBSD.ORG Thu Sep 10 00:47:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 245AC106566B; Thu, 10 Sep 2009 00:47:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 138578FC19; Thu, 10 Sep 2009 00:47:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8A0lWxV002370; Thu, 10 Sep 2009 00:47:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8A0lWwR002368; Thu, 10 Sep 2009 00:47:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200909100047.n8A0lWwR002368@svn.freebsd.org> From: Warner Losh Date: Thu, 10 Sep 2009 00:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197051 - head/usr.sbin/btxld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Sep 2009 00:47:33 -0000 Author: imp Date: Thu Sep 10 00:47:32 2009 New Revision: 197051 URL: http://svn.freebsd.org/changeset/base/197051 Log: 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 :) Modified: head/usr.sbin/btxld/btxld.c Modified: head/usr.sbin/btxld/btxld.c ============================================================================== --- head/usr.sbin/btxld/btxld.c Wed Sep 9 21:51:54 2009 (r197050) +++ head/usr.sbin/btxld/btxld.c Thu Sep 10 00:47:32 2009 (r197051) @@ -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);