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: Tue, 3 Dec 2013 09:47:31 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Dec 03, 2013 at 09:22:56AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
> >> I've looked through encoding of those instructions and see how much it's
> >> a mess. b* and b*x don't have similar set of options which makes
> >> validating them a difficult error-prone task. So I think, I'll just add
> >> veneers to mkimage, just like we do on ia64 (either by making a
> >> pc-relative variant of veneers or adding fixup for them)
> > 
> > Not B, BL.
> > There is a 1-bit range difference between Thumb BL and BLX, which we
> > need to check for anyway. This check already exists (and must exist) in
> > the code. Adding veneers would be pure overhead.
> 
> I meant that you can use conditions with bl but not blx. So if we have a
> reloc on ARM bl.e targetting Thumb then we have to add veneers. Since we
> have only small number of interworking calls it's probably easier to
> always add veneers on interworking relative relocations rather than
> having micro-optimisation and get some minor case wrong.

OK, but the only place we could ever have a problem with this would
be if we had asm in the kernel _explicitly_ done as .thumb.
Which we don't. We explicitly moved away from that in order to have
support for pre-v7 processors.

All modules will have full 32-bit external references, so will not
use these instructions anyway. Any internal references within modules
will be linked with LD, which will fix this up automatically.

/
    Leif



reply via email to

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