thumb-2 and crt0.S init_hooks

Nick Clifton
Mon Oct 6 19:19:00 GMT 2008

Hi Bill,

>   ldr     r3, .Lhwinit

> The LR then contains a word-aligned address, rather than having bit 0 
> set to indicate thumb mode.

I think that the problem might be that you have not told the linker that 
hardware_init_hook and software_init_hook are thumb function names, and 
so it does not know that it needs to set the bottom bit when their 
addresses are taken.  Try adding:


just before you declare the hooks and see if that works.


More information about the Newlib mailing list