From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH, RFC, RFT] ARM relocation fixes
Date: Mon, 02 Dec 2013 18:38:56 +0100 [thread overview]
Message-ID: <529CC5B0.9010508@gmail.com> (raw)
In-Reply-To: <20131202141450.GG24997@rocoto.smurfnet.nu>
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
> .
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
next prev parent reply other threads:[~2013-12-02 17:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-01 6:06 [PATCH, RFC, RFT] ARM relocation fixes Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 10:53 ` Leif Lindholm
2013-12-02 10:58 ` Leif Lindholm
2013-12-02 10:59 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 11:28 ` Leif Lindholm
2013-12-02 11:43 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 11:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 13:30 ` Leif Lindholm
2013-12-02 14:14 ` Leif Lindholm
2013-12-02 14:33 ` Leif Lindholm
2013-12-02 17:32 ` Leif Lindholm
2013-12-02 17:40 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 17:38 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-12-02 17:45 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 19:40 ` Leif Lindholm
2013-12-02 20:04 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 20:46 ` Leif Lindholm
2013-12-03 5:37 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 8:14 ` Leif Lindholm
2013-12-03 8:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 8:47 ` Leif Lindholm
2013-12-03 9:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 11:16 ` Leif Lindholm
2013-12-03 12:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 8:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-03 11:23 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=529CC5B0.9010508@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.