grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 5/6] multiboot2: Add support for relocatable images


From: Daniel Kiper
Subject: Re: [PATCH v2 5/6] multiboot2: Add support for relocatable images
Date: Thu, 12 Nov 2015 14:33:50 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Nov 12, 2015 at 02:26:21PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
> On 12.11.2015 14:15, Daniel Kiper wrote:
> > On Tue, Nov 10, 2015 at 04:23:46PM +0100, Vladimir 'phcoder' Serbinenko 
> > wrote:
> >> Le 10 nov. 2015 3:52 PM, "Daniel Kiper" <address@hidden> a écrit :
> >>> On Mon, Nov 09, 2015 at 09:08:35PM +0100, Vladimir 'φ-coder/phcoder'
> >> Serbinenko wrote:
> >>>> On 20.07.2015 16:35, Daniel Kiper wrote:
> >>>>> Signed-off-by: Daniel Kiper <address@hidden>
> >>>> What is handling the actual relocation?
> >>>
> >>> In Xen we get image offset from GRUB2 and using this value we calculate
> >>> relative addresses. We are using %fs for it.
> >>>
> >>>> Why doesn't this patch include support for ELF relocations?
> >>>
> >>> This is another option. We considered it too. However, in our case
> >>> relative addressing looks simpler then ELF relocations.
> >> How is it simpler than to have a fully relocated binary when you start?
> >
> > Xen ELF file does not have relocations.
> >
> >> How do you pass the offset?
> >
> > Via MULTIBOOT_TAG_TYPE_BASE_ADDR tag.
> >
> >> Does xen have any relocation entries?
> >
> > No.
> >
> Can we then settle on using your interface but saying that bootloader
> has to execute all ELF relocations? Since you don't have them, you
> wouldn't be affected by the change but it would allow easy creation of
> relocatable binaries. Feel free in the first patch just to have a check
> for absence of relocation entries. x86-64 has only about 5 relocations
> we care about so should be easy to implement. We can reuse code in dl.c.

Granted!

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]