Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VnZM2-0007Vl-78 for mharc-grub-devel@gnu.org; Mon, 02 Dec 2013 14:40:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnZLu-0007Py-Jm for grub-devel@gnu.org; Mon, 02 Dec 2013 14:40:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnZLm-0001Na-6J for grub-devel@gnu.org; Mon, 02 Dec 2013 14:40:18 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:56121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnZLm-0001NW-0n for grub-devel@gnu.org; Mon, 02 Dec 2013 14:40:10 -0500 Received: by mail-we0-f175.google.com with SMTP id p61so12263645wes.6 for ; Mon, 02 Dec 2013 11:40:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=XUl69+pTFvE12QD87ngT+eCRc7VBNbzIHW5KZGSqDy0=; b=mgChnDVeULFNr0pfCaLnllazKe99AKJBFGVDBffMSMqbNBga516Q6siqzAVNNMGO71 ZjznaEGMWI6ia+HOcHvIRRcvJZz0AyUJIJ3JtzfW2tW+E45K72TPe+bSk4HSXr9ZiSky yS44sc//YhNU5PYuOn08IlQzzrgcySZgj0OPhaFkX7URsqAH+DcX2Ct1DQG6s7cZ8bEy DumNdvikCo0MmgK+brkJyD4tmooS3gDneHsyzuDyz7s+AEHkYyZDaCuK5ahZr35HnHh7 IRQwG8kgNqtvazI/rn+eFLGChA9767AUpZ6gApw9LjedwN4eQz10NLx2ZD0bFgWdarww pV5Q== X-Gm-Message-State: ALoCoQnCeSv2A0qYk10IoJOWp9TRXpBPe9aEe63aAZcACTQNAHuK3dz5DHAEfLcKH93zjOhhIoE6 X-Received: by 10.180.198.46 with SMTP id iz14mr19779657wic.40.1386013209051; Mon, 02 Dec 2013 11:40:09 -0800 (PST) Received: from rocoto.smurfnet.nu ([2001:4b98:dc0:41:216:3eff:fea7:75f3]) by mx.google.com with ESMTPSA id y20sm25090184wib.0.2013.12.02.11.40.06 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Dec 2013 11:40:07 -0800 (PST) Date: Mon, 2 Dec 2013 20:40:20 +0100 From: Leif Lindholm To: The development of GNU GRUB Subject: Re: [PATCH, RFC, RFT] ARM relocation fixes Message-ID: <20131202194020.GN24997@rocoto.smurfnet.nu> 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> <529CC74C.2060903@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <529CC74C.2060903@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.175 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 19:40:25 -0000 On Mon, Dec 02, 2013 at 06:45:48PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > > My default ARMv7 UEFI build fails to grub-install with > > /work/local/grub/uefi/sbin/grub-install: error: bl/b.w targettting ARM. > > This is a problem because of asm functions which are always ARM and gcc > uses bl to jump to them from thumb that an't be satisified. I wonder if > it's better to add veneers to mkimage or to add explicit thumb interwork > to all asm functions like I did in my other patch. Ah. When linking with a standalone linker, it rewrites BL to BLX where this is required for state change - so doing that #ifdef GRUB_UTIL wouldn't be wrong. > In my local build > I've cheated by decraling all those functions with __attribute__ > ((long_call)) but it's probably not right solution so I didn't commit it. On a lazy note, putting -mlong-calls back into CFLAGS_PLATFORM resolves this issue (since it forces full address loads into PC rather than using relative addressing and unconditional instruction set state change). / Leif