env.h err.h file.h fs.h kernel.h misc.h mm.h net.h parser.h reader.h \
symbol.h term.h time.h types.h loader.h partition.h \
msdos_partition.h machine/kernel.h handler.h list.h \
- command.h machine/memory.h cpu/libgcc.h cpu/cache.h
+ command.h machine/memory.h cpu/libgcc.h cpu/cache.h cpu/dl.h
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
if ($1 in symtab) {
modtab[module] = modtab[module] " " symtab[$1];
}
- else if ($1 != "__gnu_local_gp"){
+ else {
printf "%s in %s is not defined\n", $1, module >"/dev/stderr";
error++;
exit;
#include <grub/elf.h>
#include <grub/misc.h>
#include <grub/err.h>
+#include <grub/cpu/types.h>
/* Check if EHDR is a valid ELF header. */
grub_err_t
Elf_Ehdr *e = ehdr;
/* Check the magic numbers. */
+#ifdef WORDS_BIGENDIAN
+ if (e->e_ident[EI_CLASS] != ELFCLASS32
+ || e->e_ident[EI_DATA] != ELFDATA2MSB
+ || e->e_machine != EM_MIPS)
+#else
if (e->e_ident[EI_CLASS] != ELFCLASS32
|| e->e_ident[EI_DATA] != ELFDATA2LSB
- || e->e_machine != EM_386)
+ || e->e_machine != EM_MIPS)
+#endif
return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
return GRUB_ERR_NONE;