This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: thumb-2 and crt0.S init_hooks
- From: Nick Clifton <nickc at redhat dot com>
- To: Bill Tompkins <bill+newlib at key-square dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 03 Oct 2008 15:24:48 +0100
- Subject: Re: thumb-2 and crt0.S init_hooks
- References: <C44C6029-D84C-4F9B-93F4-3D536AACF6BF@key-square.com>
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:
.thumb_func
just before you declare the hooks and see if that works.
Cheers
Nick