We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The least significant bit of the address is used by some ARM/Thumb instructions to determine the instruction set to use, e.g.[font="Lucida Console"]MOV r0,#0x21BX r0[/font]Branches to address 0x20, and switches to Thumb state, whilst:[font="Lucida Console"]MOV r0,#0x20BX r0[/font]Branches to address 0x20, and switches to ARM state.hths.
I think this amounts to the samething, consider:[font="Lucida Console"]LDR r0,datalabelBX r0...datalabel DCD somefunc[/font]Here, the value inserted for [font="Lucida Console"]somefunc [/font] needs to have the LSB set if [font="Lucida Console"]somefunc [/font] is the symbol for a Thumb function. At which point the Thumb function code will reside at a halfword aligned location, whereas the symbol will be unaligned due to the least-significant-bit being set.hths.
...My question is more about the starting address of a symbol/function code....