Subject: Re: Weirdness with ELF bootblocks
To: Simon Burge <simonb@wasabisystems.com>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-hp300
Date: 02/13/2001 08:33:40
On Tue, Feb 13, 2001 at 11:58:37PM +1100, Simon Burge wrote:

 > Index: rominfo.h
 > ===================================================================
 > RCS file: /cvsroot/syssrc/sys/arch/hp300/stand/common/rominfo.h,v
 > retrieving revision 1.1
 > diff -d -p -u -r1.1 rominfo.h
 > --- rominfo.h	1997/02/04 03:52:49	1.1
 > +++ rominfo.h	2001/02/13 12:54:17
 > @@ -47,7 +47,7 @@
 >  struct jmpvec {
 >  	short op;	/* jmp instruction */
 >  	long  addr;	/* address */
 > -};
 > +} __attribute__((__packed__));

This one is obviously correct.

 >  struct rominfo {
 >  	char p1[0xDC0];
 > @@ -65,4 +65,4 @@ struct rominfo {
 >  	char  p6;		/* ??				(FFFFFEDB) */
 >  	long  msus;		/* ??				(FFFFFEDC) */
 >  	struct jmpvec jvec[48];	/* jump vectors			(FFFFFEE0) */
 > -};
 > +} __attribute__((__packed__));

You might want to see how the a.out compiler padded this one (not sure
what happens to the "char" -- I'm pretty sure it's packed in a.out, but
you might want to make sure...)

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>