2010-11-08 Manoel Rebelo Abranches <mrabran@br.ibm.com>

* include/grub/elfload.h (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * kern/elf.c (grub_elf32_size): New parameter. All users updated.
        Return maximum segments alignment.
        (grub_elf64_size): Likewise.
        * grub-core/loader/powerpc/ieee1275/linux.c:
        (grub_linux_claimmap_iterate): New function. Uses the "available"property
        in the "memory" node for memory allocation for kernel in the PowerPC loader.
        (grub_linux_load32): Correctly find linux entry point offset.
        (grub_linux_load64): Likewise.
This commit is contained in:
Manoel Rebelo Abranches 2010-11-08 11:14:54 -02:00
parent d2bf06bf34
commit 9c4cf53bfe
6 changed files with 110 additions and 67 deletions

View file

@ -91,7 +91,7 @@ grub_linux_load32 (grub_elf_t elf, void **extra_mem, grub_size_t extra_size)
/* Linux's entry point incorrectly contains a virtual address. */
entry_addr = elf->ehdr.ehdr32.e_entry;
linux_size = grub_elf32_size (elf, &base);
linux_size = grub_elf32_size (elf, &base, 0);
if (linux_size == 0)
return grub_errno;
target_addr = base;
@ -146,7 +146,7 @@ grub_linux_load64 (grub_elf_t elf, void **extra_mem, grub_size_t extra_size)
/* Linux's entry point incorrectly contains a virtual address. */
entry_addr = elf->ehdr.ehdr64.e_entry;
linux_size = grub_elf64_size (elf, &base);
linux_size = grub_elf64_size (elf, &base, 0);
if (linux_size == 0)
return grub_errno;
target_addr = base;