Help me please with gnu assembler for arm926ejs cpu.
I try to build a simple program(test.S):
.global _start
_start:
mov r0, #2
bx lr
here answer.
Thanks for all.
http://stuff.mit.edu/afs/sipb/project/egcs/src/egcs/gcc/config/arm/README-interworking
Calls via function pointers should use the
BXinstruction if the call is made in ARM mode:.code 32 mov lr, pc bx rXThis code sequence will not work in Thumb mode however, since the mov instruction will not set the bottom bit of the
lrregister. Instead a branch-and-link to the_call_via_rXfunctions should be used instead:.code 16 bl _call_via_rXwhere
rXis replaced by the name of the register containing the function address.