Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2001 09:35:01 -0700
From:      Mark Peek <mark@whistle.com>
To:        Harti Brandt <brandt@fokus.gmd.de>
Cc:        <net@FreeBSD.ORG>, <current@FreeBSD.ORG>
Subject:   Re: Problem with pxeboot and binutils-2.11
Message-ID:  <p05100306b7986a294bcd@[207.76.207.129]>
In-Reply-To: <20010809163526.P49083-100000@beagle.fokus.gmd.de>
References:  <20010809163526.P49083-100000@beagle.fokus.gmd.de>

next in thread | previous in thread | raw e-mail | index | archive | help
At 4:46 PM +0200 8/9/01, Harti Brandt wrote:
>some time ago we reported a problem with pxeboot under -current (see below).
>We have tried to track down the problem and it seems to be a bug or a
>feature in gas or libbfd. It turns out, that the output from pxeldr before
>the binutils-2.11 import on 5/29/2001 was 500 bytes long. After the import
>the output has grown to 512 byte. The excess bytes contain a jump to the
>address 512 and a number of NOPs. The result of this is, that the loader
>image which is located imediately after pxeldr is shifted by 12 bytes
>and the address calculations in pxeldr.s are wrong now.
>
>Unfortunately we're not able to find out what new bug^h^h^hfeature of
>gas or libbfd causes this behaviour. A simple workaround is to strip the
>excess bytes from pxeldr just before building pxeboot, but that is REALLY
>ugly:


It appears that gas is now properly padding the end of the text 
section (and inserting the jmp and nops). This, in turn, misaligns 
the loader that is tacked onto the end of the pxeldr. I'm currently 
not setup to test pxeboot'ing but here's a patch that might fix it.

Mark


Index: pxeldr.s
===================================================================
RCS file: /cvs/freebsd/src/sys/boot/i386/pxeldr/pxeldr.s,v
retrieving revision 1.6
diff -u -u -r1.6 pxeldr.s
--- pxeldr.s	2001/02/06 11:20:05	1.6
+++ pxeldr.s	2001/08/09 16:28:07
@@ -278,4 +278,5 @@
  relocate_msg:	.asciz	"Relocating the loader and the BTX\r\n"
  jump_message:	.asciz	"Starting the BTX loader\r\n"

+		.p2align 4
  end:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05100306b7986a294bcd>