2007-02-20 Hollis Blanchard <hollis@penguinppc.org>
* include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t. All users updated. (grub_elf64_load_hook_t): Likewise. * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve debug output.
This commit is contained in:
parent
3ce27299eb
commit
9b09e6fca0
4 changed files with 67 additions and 28 deletions
|
@ -132,8 +132,8 @@ grub_linux_load32 (grub_elf_t elf)
|
|||
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Could not claim memory.");
|
||||
|
||||
/* Now load the segments into the area we claimed. */
|
||||
auto int offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr);
|
||||
int offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr)
|
||||
auto grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr);
|
||||
grub_err_t offset_phdr (Elf32_Phdr *phdr, grub_addr_t *addr)
|
||||
{
|
||||
/* Linux's program headers incorrectly contain virtual addresses.
|
||||
* Translate those to physical, and offset to the area we claimed. */
|
||||
|
@ -175,8 +175,8 @@ grub_linux_load64 (grub_elf_t elf)
|
|||
return grub_error (GRUB_ERR_OUT_OF_MEMORY, "Could not claim memory.");
|
||||
|
||||
/* Now load the segments into the area we claimed. */
|
||||
auto int offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr);
|
||||
int offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr)
|
||||
auto grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr);
|
||||
grub_err_t offset_phdr (Elf64_Phdr *phdr, grub_addr_t *addr)
|
||||
{
|
||||
/* Linux's program headers incorrectly contain virtual addresses.
|
||||
* Translate those to physical, and offset to the area we claimed. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue