thumb-2 and crt0.S init_hooks

Jeff Johnston jjohnstn@redhat.com
Mon Oct 13 13:37:00 GMT 2008


Nick Clifton wrote:
> Hi Bill,
>
>> The problem isn't the address of the hardware_init_hook, though,
>> but of the return address that was set up by the
>>    mov     lr, pc
>> instruction.  It looks to me as though the pc value (transferred to 
>> the lr)
>> does not have the low bit set, and so a function that returns with
>>    bx lr
>> rather than
>>    mov pc, lr
>> will fault.
>
> Good point.  You are right, your patch will solve the problem.
>
> Jeff - can Bill's patch from here:
>
>   http://sourceware.org/ml/newlib/2008/msg00500.html
>
> be checked in please ?
>
> Cheers
>   Nick
Done.

-- Jeff J.



More information about the Newlib mailing list