Subject: Re: ELF
To: Frederick Bruckman <fb@enteract.com>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-mac68k
Date: 07/09/2001 19:58:55
Wow, I am behind in my EMail....

On Sun, 13 May 2001, Frederick Bruckman wrote:

> What about adding a post-linker step to convert the kernel to aout?
> Something along the lines of "objcopy -I elf32-m68k -O
> a.out-m68k-netbsd netbsd.ELF netbsd". It might even be possible to
> specify "-oformat a.out-m68k-netbsd" as an argument to "ld". If
> neither works, see what other magic "elf2aout" on i386 accomplishes.

Having worked in making ofwboot.xcf using an ELF toolchain, you might have
problems. But then again, the problems might just have been binutils/XCOFF
specific.

One problem is that ELF files have a lot more sections than a.out and
XCOFF ones do. So you have to do something to compact or remove
sections. The file sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x is
a linker script which munges ELF files into a set of sections which work
for converting to XCOFF. It might even work for converting to a.out.

Take care,

Bill