From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 25 13:02:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 680E916A4CE for ; Sun, 25 Apr 2004 13:02:50 -0700 (PDT) Received: from TRANG.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A1F043D2D for ; Sun, 25 Apr 2004 13:02:50 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by TRANG.nuxi.com (8.12.11/8.12.10) with ESMTP id i3PK2kZx004338; Sun, 25 Apr 2004 13:02:46 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.11/8.12.11/Submit) id i3PK2jDL004337; Sun, 25 Apr 2004 13:02:45 -0700 (PDT) (envelope-from obrien) Date: Sun, 25 Apr 2004 13:02:45 -0700 From: "David O'Brien" To: Ryan Sommers Message-ID: <20040425200245.GA97921@dragon.nuxi.com> Mail-Followup-To: David O'Brien , Ryan Sommers , hackers@freebsd.org References: <49216.63.226.178.14.1082755139.squirrel@www2.neuroflux.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49216.63.226.178.14.1082755139.squirrel@www2.neuroflux.com> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.2-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: hackers@freebsd.org Subject: Re: Method of compiling boot0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2004 20:02:50 -0000 On Fri, Apr 23, 2004 at 03:18:59PM -0600, Ryan Sommers wrote: > I was browsing over the boot0 makefiles and source when I was playing with > some boot sector code of mine and I was wondering why the designers chose > to use objcopy to output a binary file instead of just using the --oformat > option when it's run over the linker. I converted most i386 boot things to use the linker options. I was unable to us them on boot2.bin. Rather using them to produce boot2.bin produced a different file than what is in CVS right now. I didn't have time to track down why, but if you'd like to analyis this I'd appreciate it. Index: i386/boot2/Makefile =================================================================== RCS file: /home/ncvs/src/sys/boot/i386/boot2/Makefile,v retrieving revision 1.55 diff -u -r1.55 Makefile --- i386/boot2/Makefile 17 Feb 2004 07:13:03 -0000 1.55 +++ i386/boot2/Makefile 25 Apr 2004 19:53:01 -0000 @@ -53,7 +53,7 @@ boot1.out: boot1.o ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o -CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ +CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.o \ boot2.s boot2.s.tmp boot2.h sio.o boot2: boot2.ld @@ -68,11 +68,8 @@ boot2.ldr: dd if=/dev/zero of=${.TARGET} bs=276 count=1 -boot2.bin: boot2.out - objcopy -S -O binary boot2.out ${.TARGET} - -boot2.out: ${BTXCRT} boot2.o sio.o - ${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} +boot2.bin: ${BTXCRT} boot2.o sio.o + ${LD} ${LDFLAGS} -Ttext ${ORG2} -S --oformat binary -o ${.TARGET} ${.ALLSRC} boot2.o: boot2.s -- -- David (obrien@FreeBSD.org)