Subject: Linking a.out on elf machines
To: None <>
From: Krister Walfridsson <>
List: tech-toolchain
Date: 05/21/2000 20:19:40
I haven't really followed the discussions about a.out to elf transission,
but as I understand, the idea is to compile an a.out on elf machines
too, to make it possible to use old binaries. Anyway, I have promised to
teach to make a.out shared libs.

I have a (nearly) working version now, but I don't really understand how
this will help us... But my knowledge is in the inner working of libbfd,
not in the binutils, so I may have misunderstood something.

Bill Studenmund tried some with this in december, and did:

   ld -o -Ttext 0x1020   -L/usr/src/lib/libc/obj.i386
   mdprologue.o rtld.o malloc.o shlib.o md.o vfprintf.o -lc_pic
   crunchide -v -u
   objcopy -R .note -R .ident
   ld -o --oformat a.out-i386-netbsd  -T \
   /usr/src/libexec/ld.aout_so/elf_aout_merge.x -Bshareable \
   -Bsymbolic -assert nosymbolic

But the first link creates an executable. Is it obvious that it
can be converted to an a.out shared lib? It doesn't work for me

I tried to convert the .o files to a.out and then link normally,
but I cannot use objcopy to convert the files. It complains that
it cannot represent .rodata in a.out object file format...

So, does anyone have any suggestions on how this should be solved?