Port-amigappc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
elf2aout patch for PowerPC
Hello,
this is a quick and dirty hack... as I didn't write an elf kernel booter yet,
I did this to create a.out files. (elf2aout as in the tree is only compiled
for MIPS CPUs).
I didn't commit it, because I think we will eventually have an ELF booter.
You have to compile manually, or patch the Makefile, too.
Regards,
Ignatios
Index: src/usr.bin/elf2aout/elf2aout.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/elf2aout/elf2aout.c,v
retrieving revision 1.6
diff -u -r1.6 elf2aout.c
--- elf2aout.c 1998/11/27 05:09:49 1.6
+++ elf2aout.c 1999/09/07 19:40:05
@@ -217,6 +217,10 @@
/* We now have enough information to cons up an a.out header... */
aex.a_midmag = htonl((symflag << 26) | (MID_PMAX << 16) | OMAGIC);
+ if (ex.e_machine == Elf_em_ppc)
+ aex.a_midmag = htonl((symflag << 26) | (MID_POWERPC << 16)
+ | OMAGIC);
+
aex.a_text = text.len;
aex.a_data = data.len;
aex.a_bss = bss.len;
Home |
Main Index |
Thread Index |
Old Index