2008-11-03 Bean <bean123ch@gmail.com>
* kern/elf.c (grub_elf32_load): Revert to previous code. (grub_elf64_load): Likewise. * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
This commit is contained in:
parent
926b98230e
commit
556f377582
3 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-11-03 Bean <bean123ch@gmail.com>
|
||||
|
||||
* kern/elf.c (grub_elf32_load): Revert to previous code.
|
||||
(grub_elf64_load): Likewise.
|
||||
|
||||
* loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
|
||||
|
||||
2008-11-01 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* Makefile.in (CPPFLAGS): Fix builddir=. assumption.
|
||||
|
|
|
@ -232,9 +232,9 @@ grub_elf32_load (grub_elf_t _elf, grub_elf32_load_hook_t _load_hook,
|
|||
if (phdr->p_type != PT_LOAD)
|
||||
return 0;
|
||||
|
||||
load_addr = phdr->p_paddr;
|
||||
if (load_hook && load_hook (phdr, &load_addr))
|
||||
return 1;
|
||||
load_addr = phdr->p_paddr;
|
||||
|
||||
if (load_addr < load_base)
|
||||
load_base = load_addr;
|
||||
|
@ -411,9 +411,9 @@ grub_elf64_load (grub_elf_t _elf, grub_elf64_load_hook_t _load_hook,
|
|||
if (phdr->p_type != PT_LOAD)
|
||||
return 0;
|
||||
|
||||
load_addr = phdr->p_paddr;
|
||||
if (load_hook && load_hook (phdr, &load_addr))
|
||||
return 1;
|
||||
load_addr = phdr->p_paddr;
|
||||
|
||||
if (load_addr < load_base)
|
||||
load_base = load_addr;
|
||||
|
|
|
@ -454,7 +454,7 @@ grub_bsd_load_aout (grub_file_t file)
|
|||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_bsd_elf32_hook (Elf32_Phdr * phdr, UNUSED grub_addr_t * addr)
|
||||
grub_bsd_elf32_hook (Elf32_Phdr * phdr, grub_addr_t * addr)
|
||||
{
|
||||
Elf32_Addr paddr;
|
||||
|
||||
|
@ -472,6 +472,8 @@ grub_bsd_elf32_hook (Elf32_Phdr * phdr, UNUSED grub_addr_t * addr)
|
|||
if (paddr + phdr->p_memsz > kern_end)
|
||||
kern_end = paddr + phdr->p_memsz;
|
||||
|
||||
*addr = paddr;
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue