Skip to contentSkip to conversation

generic ELF loading (updated)

PATCH Hollis Blanchard 1 participant 1 message Oct 27, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · Hollis Blanchard

Here is the updated ELF loading infrastructure. A couple notes:

It is now a module, which will be auto-loaded by loaders that need it. However, I don't know where to put elf.c. The only similar files are io/gzio.c and fs/fshelp.c, but clearly elf.c doesn't belong in either of those directories.

Quoted 6 lines

I have not updated i386/pc/multiboot.c to use this. That file needs refactoring for multiboot2 anyways, so the work I'm doing for multiboot2 will replace that loader.

Comments please. Also see next mail to see how the PPC Linux loader uses it.

Here is the PPC loader patch. This works on 32-bit PPC still. Once I have retested loading 64-bit kernels I intend to check both patches in.

-Hollis

include/grub/types.h +2 -0
Index: grub2-cvs/include/grub/types.h
===================================================================
@@ -23,6 +23,8 @@
 #include <config.h>
 #include <grub/cpu/types.h>
 
+#define __unused __attribute__ ((unused))
+
 #ifdef GRUB_UTIL
 # define GRUB_CPU_SIZEOF_VOID_P	SIZEOF_VOID_P
 # define GRUB_CPU_SIZEOF_LONG	SIZEOF_LONG
loader/powerpc/ieee1275/linux.c +129 -90

289 lines not on this page · raw message