From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VnXSl-0006uT-Bd for mharc-grub-devel@gnu.org; Mon, 02 Dec 2013 12:39:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnXSe-0006td-FJ for grub-devel@gnu.org; Mon, 02 Dec 2013 12:39:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnXSZ-00053u-5F for grub-devel@gnu.org; Mon, 02 Dec 2013 12:39:08 -0500 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]:42076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnXSY-00053n-Ra for grub-devel@gnu.org; Mon, 02 Dec 2013 12:39:03 -0500 Received: by mail-ea0-f177.google.com with SMTP id n15so9182403ead.8 for ; Mon, 02 Dec 2013 09:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=ZYnguxwM1XgxtiSTn/9QjbDSc+rlw63sP2N18+6RhP4=; b=iGntd4S2YsRc0lGdNLkqsDzOMUFlnTJWRoAm+xDe/KLbms7Od3zxQcllhvSp0X2P4d bk2LWPMoGJY4WdsI6osp0yDCL1eZwcyKioiVOjMGqxweB7E17No0z7QS2rwCj3hvvRyy 1rN9dWXI3ZAkJ0Lgwd3Ed3YXQxey6CcHxbu1VNhhR1GHS5XtD3q5wRmIRsaZwjVMzWpm pFihho3QNe1Zcb+EXksxDMGqY3KSZJ7q9OMYwByeMEW1DBbpECedc1XvgVoYX2JDhV1p wZRrLWepFWoafZlGG+G4ROiL/TJeEkDlX5ZESkCPlU96r09M+jsiOMT7r9koGZbIRIWP pMsg== X-Received: by 10.14.175.3 with SMTP id y3mr2810119eel.59.1386005941970; Mon, 02 Dec 2013 09:39:01 -0800 (PST) Received: from [192.168.42.154] (39-225.197-178.cust.bluewin.ch. [178.197.225.39]) by mx.google.com with ESMTPSA id a45sm73147937eem.6.2013.12.02.09.38.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 09:39:00 -0800 (PST) Message-ID: <529CC5B0.9010508@gmail.com> Date: Mon, 02 Dec 2013 18:38:56 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH, RFC, RFT] ARM relocation fixes References: <529AD1E8.8010305@gmail.com> <20131202105330.GA24997@rocoto.smurfnet.nu> <529C6820.9090902@gmail.com> <20131202112846.GC24997@rocoto.smurfnet.nu> <529C7305.5070002@gmail.com> <20131202133051.GE24997@rocoto.smurfnet.nu> <20131202141450.GG24997@rocoto.smurfnet.nu> In-Reply-To: <20131202141450.GG24997@rocoto.smurfnet.nu> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2OSVJFMSBPLWKCOLSXLOR" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::231 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: Mon, 02 Dec 2013 17:39:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2OSVJFMSBPLWKCOLSXLOR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 runtim= e >> memory map), but crashes on the Foundation model (which does). >> So the generic dl refactoring seems correct, but somehing about the >> veneers is fishy. >=20 > Well, this one seems to be because mod->trampptr is never initilised > (which should be a problem also on the other archs?). >=20 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_Ehd= r *e) > #if !defined (__i386__) && !defined (__x86_64__) && !defined (__sparc_= _) > ptr =3D (char *) ALIGN_UP ((grub_addr_t) ptr, GRUB_ARCH_DL_TRAMP_ALI= GN); > mod->tramp =3D ptr; > + mod->trampptr =3D (ptr + tramp); > ptr +=3D tramp; > ptr =3D (char *) ALIGN_UP ((grub_addr_t) ptr, GRUB_ARCH_DL_GOT_ALIGN= ); > mod->got =3D ptr; >=20 > This runs successfully on my foundation model. >=20 > Presumably, on other architectures a similar thing for mod->gotptr is > required? >=20 > / > Leif >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > . >=20 ------enig2OSVJFMSBPLWKCOLSXLOR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKcxbAACgkQmBXlbbo5nOvijAD+NmBuhgeIloe8BG1NrXmG8IOJ 2TbaUFSWH6Ok5ExxEhYA/jWnqYbyxJpd6YX/BFwv/pnbhrY2gKhwT+5a3XP01pAf =v1gZ -----END PGP SIGNATURE----- ------enig2OSVJFMSBPLWKCOLSXLOR--