On Mon, 2008-12-15 at 10:00 +0100, Markus Barenhoff wrote: > Hi, > > I've a problem with a array of void*, with different versions of arm-elf-gcc. > Tried it with 4.3.1 and with current HEAD 4.4.0 from CVS.. Problem seems to > exists von both versions. I've created a small example of it: > > ---- snip ---- > void a(void); > > void (**v)(void) = { &a }; > > int main() > { > v[0](); > return 0; > } > > void a(void) { } > ---- snip ---- > > I compiled it for cortex-m3 and if I look at the created binary with objdump, > I see, the following for v: > > ---- snip ---- > a.out: file format elf32-littlearm > > 000118d0 <v>: > 118d0: 0000819d .word 0x0000819d > ---- snip ---- > > but the problem is, that the function a is located at 0x819c and not 0x819...
Indeed, but it's not a problem. The bottom bit indicates that the instruction at that address is Thumb, not ARM (all instructions on ARM systems are at least 2-byte aligned, so bit[0] is used to describe the instruction set). R.