From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Zwrtk-0005hQ-Rx for mharc-grub-devel@gnu.org; Thu, 12 Nov 2015 08:26:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwrth-0005hK-VZ for grub-devel@gnu.org; Thu, 12 Nov 2015 08:26:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwrth-0008BL-01 for grub-devel@gnu.org; Thu, 12 Nov 2015 08:26:41 -0500 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:37358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwrtg-0008BH-Pw for grub-devel@gnu.org; Thu, 12 Nov 2015 08:26:40 -0500 Received: by wmww144 with SMTP id w144so88316024wmw.0 for ; Thu, 12 Nov 2015 05:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=+D0If+7JvHob7sT9aP1ZYSJCR8yc6G34yK6hEWWgv+4=; b=iHuX7eLHpE/9E5Y0DM1bmp4chghJhqJ3rflBfsqvNho71NayMjeFHGY4WSCuapoR2S KhnTFX99DQLOTVbI09k+Fi6Q6CxTAeDM5s0Q5uReuGgs0ZfolOzo1FklYKXFcAdWI27O htWCPTiSA1PxoVGvNLRkgJwWnDihT9krYLS8qSWP4YeOTlEnQAeWTUmEWg5vY0QaQKWq qRGiKFUI9dUtwqd52Rv+VqvxT2Cg1bWW4iORQ1EbPvrIE4QY0i2JC8l7C3qXE6SbVgBM 3vVW8ZylmEG1BoqQKa4dsLHbqV1JV5n5CMRBfq4Kdcph9QIPrnaaGsZNXyZBA8Fz6Nl3 uaGQ== X-Received: by 10.28.132.13 with SMTP id g13mr17935489wmd.71.1447334800201; Thu, 12 Nov 2015 05:26:40 -0800 (PST) Received: from ?IPv6:2620:0:105f:fd00:863a:4bff:fe50:abc4? ([2620:0:105f:fd00:863a:4bff:fe50:abc4]) by smtp.gmail.com with ESMTPSA id t5sm15054635wmt.1.2015.11.12.05.26.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 05:26:39 -0800 (PST) Subject: Re: [PATCH v2 5/6] multiboot2: Add support for relocatable images To: Daniel Kiper , The development of GRUB 2 , "xen-devel@lists.xen.org" References: <1437402954-7375-1-git-send-email-daniel.kiper@oracle.com> <1437402954-7375-6-git-send-email-daniel.kiper@oracle.com> <5640FD43.7060301@gmail.com> <20151110145229.GT26902@olila.local.net-space.pl> <20151112131555.GW26902@olila.local.net-space.pl> From: =?UTF-8?Q?Vladimir_'=cf=86-coder/phcoder'_Serbinenko?= X-Enigmail-Draft-Status: N1110 Message-ID: <5644937D.7010500@gmail.com> Date: Thu, 12 Nov 2015 14:26:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151112131555.GW26902@olila.local.net-space.pl> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="PNFClXHDUmvhaic0ATkdgtOeT8a6bQAMn" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::235 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Nov 2015 13:26:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PNFClXHDUmvhaic0ATkdgtOeT8a6bQAMn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" a =C3= =A9crit : >>> On Mon, Nov 09, 2015 at 09:08:35PM +0100, Vladimir '=CF=86-coder/phco= der' >> Serbinenko wrote: >>>> On 20.07.2015 16:35, Daniel Kiper wrote: >>>>> Signed-off-by: Daniel Kiper >>>> What is handling the actual relocation? >>> >>> In Xen we get image offset from GRUB2 and using this value we calcula= te >>> 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= ? >=20 > Xen ELF file does not have relocations. >=20 >> How do you pass the offset? >=20 > Via MULTIBOOT_TAG_TYPE_BASE_ADDR tag. >=20 >> Does xen have any relocation entries? >=20 > No. >=20 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. >> Was such xen already released? Just looking for how it should >> be in perspective and how to get there >=20 > We agreed (in Xen community) that we would like to have multiboot2 prot= ocol > with additional features set in stone at first. So, this patch series j= ust > propose some changes which are required by Xen but they are not used by= any > Xen release yet. Additionally, we want that these extensions are quite = generic > and could be used by other projects if they need them too. >=20 > Daniel >=20 --PNFClXHDUmvhaic0ATkdgtOeT8a6bQAMn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREKAAYFAlZEk30ACgkQmBXlbbo5nOsQDAEAowtC7owIDTGjzmv2O3L4l5W1 /m1+OpJ15ZUKw1Tyzs8A/jEQv0IG/35kcEkZywbWuzVPh12GXBr+wUjfDxepd50F =6pDM -----END PGP SIGNATURE----- --PNFClXHDUmvhaic0ATkdgtOeT8a6bQAMn--