[PATCH] ARM: force linker to use PIC veneers

Ard Biesheuvel ard.biesheuvel at linaro.org
Tue Mar 24 16:30:33 PDT 2015


On 25 March 2015 at 00:25, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Tue, Mar 24, 2015 at 04:51:07PM +0100, Ard Biesheuvel wrote:
>> Yes, there are still some instances left of that, including the core
>> cpu_resume() itself.
>> (and they all copy the same comment :-))
>
> That's because I follow the ethos of "why write complex code when
> simple and obvious code will do" and we'd done this for the original
> SA11x0 CPU resume code which formed (to some extent) the basis of the
> consolidated version we have today.
>
> At the time cpu_resume() was consolidated (which is actually only in
> the last five years or so) there wasn't the requirement to have large
> kernels link, so rewriting it as relatively complex implementation
> would've been damned stupid and a needless change in the consolidation
> effort.
>

Oh I totally agree. The simplest code that does the job correctly
should be preferred in almost all cases. But some of the copies are
rather shallow, e.g., the s5pv210 code sits in .data, but does nothing
except branch to cpu_resume(). Here the pattern is copied for no
obvious reason.



More information about the linux-arm-kernel mailing list