Subject: Re: 64-bit daddr_t problems with libsa
To: David Laight <david@l8s.co.uk>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 01/31/2003 12:06:21
David Laight wrote:

> > On pmax however, we're still 40 bytes over...
> 
> This change to strerror.c might win that back.
> I'll commit it now if you want...

Other than that (as has been pointed out elsewhere) the first stage
bootblocks on this platform don't use strerror, this does indeed make a
significant size difference on mips and alpha:

On mips:
	text    data    bss     dec     hex     filename
	680     384     64      1128    468     strerror.o.OLD
	112     560     0       672     2a0     strerror.o
	112     528     64      704     2c0     strerror.o.XXX

On alpha:
	text    data    bss     dec     hex     filename
	1000    0       64      1064    428     strerror.o.OLD
	453     336     0       789     315     strerror.o
	473     272     64      809     329     strerror.o.XXX

One possible side effect is that this now calls snprintf() instead of
sprintf().  Whether or not this will cause yet another library routine
to be pulled in I haven't checked.  The .XXX objects above revert to
using

	sprintf(ebuf, "Unknown error: code %d", err);

and is a little smaller (ignoring BSS).

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