Re: Nokia n900 and Euphoria
- Posted by mattlewis (admin) May 17, 2011
- 5465 views
Jerome said...
Sorry, you are right! I didn't double check to make sure all the text went into the Pastey... Ok, so I have two new pasteys which should hvae everything: http://openeuphoria.org/pastey/69.wc and http://openeuphoria.org/pastey/70.wc. I re-built in debug mode, and then copied out the symbols table and the blocks of dissasembly that refer to cdecl_call_back, which is now at 0000cfd4.
Heh...well, we got some callbacks in pastey 70. Based on that, 124 looks like the right answer, and it seems to be finding it. I think that the blx instruction is relative, not absolute, however. I don't know much about ARM assembly, but this looks like the relevant part:
d500: e59f0020 ldr r0, [pc, #32] ; d528 <call_back9+0x7c> d504: e51b1008 ldr r1, [fp, #-8] d508: e51b200c ldr r2, [fp, #-12] d50c: e51b3010 ldr r3, [fp, #-16] d510: e12fff3c blx ip d514: e1a03000 mov r3, r0 d518: e1a00003 mov r0, r3 d51c: e24bd004 sub sp, fp, #4 ; 0x4 d520: e8bd8800 pop {fp, pc} d524: 00000000 .word 0x00000000 d528: 12345678 .word 0x12345678So, rather than putting in the absolute address, I think we need to have a relative address. We were using a similar thing with 64-bit code, though for various reasons, made this use an absolute address. We might want to do something similar here.
Matt