[PATCH] ARM: force linker to use PIC veneers
Ard Biesheuvel
ard.biesheuvel at linaro.org
Thu Mar 26 05:24:01 PDT 2015
On 26 March 2015 at 13:22, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Thu, Mar 26, 2015 at 01:20:16PM +0100, Ard Biesheuvel wrote:
>> On 26 March 2015 at 12:36, Russell King - ARM Linux
>> <linux at arm.linux.org.uk> wrote:
>> > On Wed, Mar 25, 2015 at 10:46:14AM +0000, Dave Martin wrote:
>> >> Hmmm, you seem to be right.
>> >>
>> >> Thumb has no bx <label> instruction, and veneers introduced by ld are
>> >> always ARM code, so this looks tricky to avoid without patching ld.
>> >>
>> >> As you observe, this only impacts large kernels anyway.
>> >>
>> >> So,
>> >>
>> >> Reviewed-by: Dave Martin <Dave.Martin at arm.com>
>> >
>> > Someone needs to check what the result is like for older CPUs too.
>> >
>>
>> Any specific concerns? The --pic-veneer switch dates back to 2009, so
>> it's been around for a while
>
> BX. Not every CPU supports BX.
>
The bx is used for the Thumb -> ARM switch inside the veneer only, so
if you build for ARM these won't appear in the output
More information about the linux-arm-kernel
mailing list