Subject: Re: bootxx_ffs maximum load size exceeded
To: Paul Mather <paul@gromit.dlib.vt.edu>
From: Simon Burge <simonb@wasabisystems.com>
List: port-alpha
Date: 12/25/2004 00:12:49
--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Dec 24, 2004 at 11:53:06AM +1100, Simon Burge wrote:

> Paul Mather wrote:
> 
> > I run NetBSD/alpha 2.0E-CURRENT, last completely rebuilt back in May.  I
> > thought I'd do another build.sh complete rebuild after cvs
> > updating /usr/src a day or so ago.  Unfortunately, the build stops,
> > complaining "checking sizes for bootxx_ffs/bootxx_ffs.sym... MAXIMUM
> > LOAD SIZE EXCEEDED (7832 > 7680)".
> > 
> > Is anyone else seeing this?  Is there anything I can do to eliminate
> > this error?
> > 
> > I've included at the end the latter part of the build.sh log.
> 
> This is a known problem - a quick look at the PR database didn't show
> anything up though.  There's an extra section (a debug section? - I
> can't recall) that newer binutils adds, and we need to work out how to
> remove it.

The attached patch is pretty gross, but at least allows bootxx_ffs
to build.  bootxx_lfs is still too big, so I've disabled the
building of that for now.  I'm not sure if anyone actually uses
bootxx_lfs?  I did test it once ages ago when I was playing around with
boot-off-LFS-on-raidframe.  Note that I haven't tested the resultant
bootxx_ffs yet - my alphas are turned off right now.

Should I commit this so as to at least allow builds to work again?  If
so, I'd also add a doc/HACKS entry too.  I'm also asking the binutils
folks what we can do about this.

Simon.
--
Simon Burge                                   <simonb@wasabisystems.com>
NetBSD Development, Support and Service:   http://www.wasabisystems.com/

--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="alpha.bootxx.diff"

Index: Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/stand/Makefile,v
retrieving revision 1.15
diff -d -p -u -r1.15 Makefile
--- Makefile	8 May 2002 04:09:46 -0000	1.15
+++ Makefile	24 Dec 2004 13:03:17 -0000
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.15 2002/05/08 04:09:46 lukem Exp $
 
 SUBDIR=		mkbootimage setnetbootinfo
-SUBDIR+=	boot bootxx_cd9660 bootxx_ffs bootxx_lfs netboot ustarboot
+# XXX: bootxx_lfs removed until the .eh_frame issue is fixed
+SUBDIR+=	boot bootxx_cd9660 bootxx_ffs netboot ustarboot
 
 .include <bsd.subdir.mk>
Index: common/common.h
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/stand/common/common.h,v
retrieving revision 1.12
diff -d -p -u -r1.12 common.h
--- common/common.h	30 Nov 1999 22:32:08 -0000	1.12
+++ common/common.h	24 Dec 2004 13:03:17 -0000
@@ -72,3 +72,5 @@ extern char	booted_dev_name[BOOTED_DEV_M
  */
 
 void		putstr(const char *s);
+
+asm(".section .eh_frame");	/* XXX gross hack to try to make smaller .eh_frame sections to allow bootxx_* to fit in size constraints */

--sm4nu43k4a2Rpi4c--