grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH, RFC, RFT] ARM relocation fixes


From: Leif Lindholm
Subject: Re: [PATCH, RFC, RFT] ARM relocation fixes
Date: Mon, 2 Dec 2013 20:40:20 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

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