Subject: Re: Adding ELF64 support
To: None <matt@lkg.dec.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 09/03/1996 02:42:25
>  Modifying the suggested scheme to work with config is very
>do-able.  I thought Matt was asking how to do something like this
>whilst still emitting only one copy of the common functions?


Arrgh. After all that, I forgot to say I'd do it with attributes
on a "cpu" device. Perhaps something like

	# devices file for a mips
	cpu_mips1 at mainbus: elf32
	cpu_mips2 at mainbubs: elf32 | elf64

And then have a conf/files enry for elf that looks like
	exec_elf32.c:	elf32
	exec_elf64.c:	elf32
	exec_elfsubr.c:	elf32 | elf64

where exec_elf32.c and exec_elf64.c can do the #define dance to
provide 32-bit and 64-bit size-dependent ELF functions, from templates
in a header (or .c, gack) file. The common, wordsize-independent elf exec
machinery can go in exec_elfsubr.c.

This isn't relevant to the Alpha, but might be to sparc/Ultrasparc and
rs6000/PowerPC.

--Jonathan