[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug-fix elf.c powerpc ieee1275
From: |
peter cros |
Subject: |
Re: Bug-fix elf.c powerpc ieee1275 |
Date: |
Sun, 2 Nov 2008 21:22:18 +1100 |
Thanks for the explanation, but the bug has been a show stopper for
powerpc GNU-linux users trying to evaluate grub-ieee1275 since 1509,
and is still there in rev 1891.
Please can someone apply the reversion now?
On Tue, Sep 30, 2008 at 7:14 PM, Bean <address@hidden> wrote:
> On Tue, Sep 30, 2008 at 3:26 PM, peter cros <address@hidden> wrote:
>> The change was between svn version 1421 and 1509 which had bugfixes,
>> in grub_elf32_load, and grub_elf64_load.
>
> Hi,
>
> The patch is for bsd loader, but it seems it uses the wrong method to
> change load address. This is the right patch:
>
> 2008-09-30 Bean <address@hidden>
>
> * kern/elf.c (grub_elf32_load): Revert to previous code.
> (grub_elf64_load): Likewise.
Yes confirmed that is the right patch for me running ubuntu linux on
an Apple G4 powerpc and G5 powerpc64, configuration using platform
=ieee1275, target=powerpc.
>
> * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
I can't comment on i386/bsd, I had not considered how other
platforms/targets might use different calls to
(grub_elf32_load)(grub_elf64_load).
>
> diff --git a/kern/elf.c b/kern/elf.c
> index 2b1e223..8ddf9e5 100644
> --- a/kern/elf.c
> +++ b/kern/elf.c
> @@ -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;
> diff --git a/loader/i386/bsd.c b/loader/i386/bsd.c
> index 4966afa..25d0f59 100644
> --- a/loader/i386/bsd.c
> +++ b/loader/i386/bsd.c
> @@ -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;
> }
>
> --
> Bean
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
peter cros
- Re: Bug-fix elf.c powerpc ieee1275,
peter cros <=