Subject: re: Elf on SPARC?
To: Eduardo E. Horvath <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 11/05/1997 16:09:28
>Has anyone considered what's involved in emulating a NetBSD environment on
>NetBSD. Or rather, a different NetBSD environment on NetBSD. I want to
>switch to an SPARC elf64 format but still be able to run SPARC a.out
Are you sure you mean elf64 and not elf32? Does the sparc pmap
support 64-bit address spaces? If it doesn't, you probably want elf32,
or weird things will happen when you try and access memory via
pointers with the high 32 bits set. (64-bit ints and 32-bit pointers
would work better, but it may be hard to set up a toolchain for.)
Either way, there's not that much to change in the kernel. Add
in the std.sparc file, rerun config and recompile.
You'll need to configure a current GNU binutils to make an sparc Elf
toolchain, and you'll probably need to reconfigure gcc to emit the
appropriate assembler pseudo-ops for ELF. And you'll need an elf
ld.so; perhaps it's easiest to start with statically-linked binaries.