Subject: fix for compiler error compiling NetBSD-current/bebox
To: None <port-bebox@netbsd.org>
From: Mirian Crzig Lennox <mirian@xensei.com>
List: port-bebox
Date: 11/26/1998 20:38:56
Hi folks,
Trying to compile the latest NetBSD-current for bebox dies on the file
/sys/kern/exec_conf.c.
The problem is that /sys/arch/powerpc/include/aout_machdep.h contains
the following struct:
/* Relocation format. */
struct relocation_info_ppc {
int r_address; /* offset in text or data segment */
unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
r_extern : 1, /* 1 if need to add symbol to value */
: 2; /* unused bits */
enum reloc_type r_type : 5; /* relocation type */
long r_addend; /* relocation addend */
};
However, the enum reloc_type which is allocated a 5 bit wide field
here actually has 34 elements in it, as is defined in
/sys/arch/powerpc/include/reloc.h.
So, I propose to fix this problem by stealing a bit from "unused bits"
to give to r_type, so that it will be 6 bits, and large enough to have
up to 64 possible values.
Comments? Am I completely out in left field here?
--
Mirian Crzig Lennox Systems Anarchist
"There's a New World Order coming every minute.
Make mine extra cheese."