Subject: problems compiling NetBSD-current/bebox
To: None <current-users@netbsd.org>
From: Mirian Crzig Lennox <mirian@xensei.com>
List: current-users
Date: 12/02/1998 11:54:36
Hi folks,

I posted this problem about a week ago to port-powerpc and port-bebox,
but I never got any feedback.  I think it's important enough to ask
here, since it is interfering with compiling the kernel:

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."