[PATCH v2 1/8] ARM: replace PROCINFO embedded branch with relative offset

Joachim Eastwood manabian at gmail.com
Sun Apr 19 12:24:03 PDT 2015


On 19 April 2015 at 19:08, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Sun, Apr 19, 2015 at 06:59:45PM +0200, Joachim Eastwood wrote:
>> Hi Ard,
>> On 13 March 2015 at 13:07, Ard Biesheuvel <ard.biesheuvel at linaro.org> wrote:
>> > This patch replaces the 'branch to setup()' instructions embedded
>> > in the PROCINFO structs with the offset to that setup function
>> > relative to the base of the struct. This preserves the position
>> > independent nature of that field, but uses a data item rather
>> > than an instruction.
>> >
>> > This is mainly done to prevent linker failures on large kernels,
>> > where the setup function is out of reach for the branch.
>>
>> This commit (bf35706f3d09 in Linus master) breaks booting on ARMv7-M.
>>
>> When I try to boot Linus master now on my NXP LPC4357 (Cortex-M4) dev
>> kit I get the following message from u-boot.
>> ## Booting kernel from Legacy Image at 29000000 ...
>> Image Name: Linux
>> Image Type: ARM Linux Kernel Image (uncompressed)
>> Data Size: 1412318 Bytes = 1.3 MB
>> Load Address: 28008000
>> Entry Point: 28008001
>> Verifying Checksum ... OK
>> Loading Kernel Image ... OK
>> OK
>>
>> Starting kernel ...
>>
>> UNHANDLED EXCEPTION: HARD FAULT
>> R0 = ffffffff R1 = 00001038
>> R2 = 281d8711 R3 = 00000000
>> R12 = 2822092c LR = 28008023
>> PC = 2822092e PSR = 21000000
>>
>> Reverting bf35706f3d09 (plus fixing a small conflict) makes Linus
>> master boot again.
>>
>> I am using the following compiler:
>> gcc version 4.9.2 20140904 (prerelease) (crosstool-NG
>> linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09
>>
>> The ARMv7-M machine that I am using is not upstream yet, but you can
>> find the patch set on the mailing list.
>
> Interesting... it works here with stock gcc 4.9.2.  Maybe it's a bug in
> the Linaro gcc?

I tried the ARM crosscompiler from
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
and it gives me the same result as the Linaro one.

gcc version 4.9.0 (GCC)

> Could you mail me (privately) your vmlinux file (the one in the root
> directory) for analysis please?

Sure (mail already sent).

regards,
Joachim Eastwood



More information about the linux-arm-kernel mailing list