2005-02-14 Guillem Jover <guillem@hadrons.org>
* include/grub/dl.h (grub_dl_check_header): New prototype. (grub_arch_dl_check_header): Change return type to grub_err_t, remove size parameter and export function. Update all callers. * kern/dl.c (grub_dl_check_header): New function. (grub_dl_load_core): Use `grub_dl_check_header' instead of `grub_arch_dl_check_header'. Check ELF type. Check if sections are inside the core. * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch independent ELF header checks. * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise. * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use `grub_dl_check_header' instead of explicit checks. Check for the ELF type. * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use `grub_dl_check_header' instead of explicit checks. Remove arch specific ELF header checks.
This commit is contained in:
parent
5eabe94bd9
commit
c642636f8a
8 changed files with 86 additions and 86 deletions
|
@ -1,7 +1,7 @@
|
|||
/* dl.h - types and prototypes for loadable module support */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -70,6 +70,7 @@ struct grub_dl
|
|||
};
|
||||
typedef struct grub_dl *grub_dl_t;
|
||||
|
||||
grub_err_t EXPORT_FUNC(grub_dl_check_header) (void *ehdr, grub_size_t size);
|
||||
grub_dl_t EXPORT_FUNC(grub_dl_load_file) (const char *filename);
|
||||
grub_dl_t EXPORT_FUNC(grub_dl_load) (const char *name);
|
||||
grub_dl_t grub_dl_load_core (void *addr, grub_size_t size);
|
||||
|
@ -84,7 +85,7 @@ grub_err_t EXPORT_FUNC(grub_dl_register_symbol) (const char *name, void *addr,
|
|||
grub_dl_t mod);
|
||||
void *EXPORT_FUNC(grub_dl_resolve_symbol) (const char *name);
|
||||
|
||||
int grub_arch_dl_check_header (void *ehdr, grub_size_t size);
|
||||
grub_err_t grub_arch_dl_check_header (void *ehdr);
|
||||
grub_err_t grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr);
|
||||
|
||||
#endif /* ! GRUB_DL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue