[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH, RFC, RFT] ARM relocation fixes
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH, RFC, RFT] ARM relocation fixes |
Date: |
Mon, 02 Dec 2013 18:38:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 |
On 02.12.2013 15:14, Leif Lindholm wrote:
> On Mon, Dec 02, 2013 at 02:30:51PM +0100, Leif Lindholm wrote:
>>>>>> Amusingly, I wrote the attached
>>>>> Nothing is attached to your mail. Right now could you pause work on
>>>>> */dl.c: I'm reorganising them to declare more of it as platform
>>>>> independent and unify handling (ARM dl.c is unnecessarily different from
>>>>> other versions and forget some of ELF handling)
>>>>
>>>> Ok, I'll hold off.
>>>>
>>> I've uploaded current work to phcoder/reloc
>>
>> Ok, so I've tested this on arm64, and it works on the commercial FVP
>> Base model (which does not trigger veneer generation due to its runtime
>> memory map), but crashes on the Foundation model (which does).
>> So the generic dl refactoring seems correct, but somehing about the
>> veneers is fishy.
>
> Well, this one seems to be because mod->trampptr is never initilised
> (which should be a problem also on the other archs?).
>
Thanks, good catch, fixed, well it's my WIP branch.
> With
> diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
> index 33ccc98..92027e0 100644
> --- a/grub-core/kern/dl.c
> +++ b/grub-core/kern/dl.c
> @@ -317,6 +317,7 @@ grub_dl_load_segments (grub_dl_t mod, const Elf_Ehdr *e)
> #if !defined (__i386__) && !defined (__x86_64__) && !defined (__sparc__)
> ptr = (char *) ALIGN_UP ((grub_addr_t) ptr, GRUB_ARCH_DL_TRAMP_ALIGN);
> mod->tramp = ptr;
> + mod->trampptr = (ptr + tramp);
> ptr += tramp;
> ptr = (char *) ALIGN_UP ((grub_addr_t) ptr, GRUB_ARCH_DL_GOT_ALIGN);
> mod->got = ptr;
>
> This runs successfully on my foundation model.
>
> Presumably, on other architectures a similar thing for mod->gotptr is
> required?
>
> /
> Leif
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
> .
>
signature.asc
Description: OpenPGP digital signature
- Re: [PATCH, RFC, RFT] ARM relocation fixes, (continued)
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes,
Vladimir 'φ-coder/phcoder' Serbinenko <=
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/02
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/03
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/03
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/03
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/03
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/12/03
- Re: [PATCH, RFC, RFT] ARM relocation fixes, Leif Lindholm, 2013/12/03