Re: [avr-gcc-list] How to get low byte off a function address?

2008-01-21 Thread Wouter van Gulik
Erik Christiansen schreef: On Sat, Jan 19, 2008 at 04:15:35PM +0100, Wouter van Gulik wrote: How do I do such a thing? Using the lower 8 bits is possible when loading a register so why not in a table? In the past, we've encountered other relocations that aren't handled by the avr port of

Re: [avr-gcc-list] How to get low byte off a function address?

2008-01-20 Thread Erik Christiansen
On Sat, Jan 19, 2008 at 04:15:35PM +0100, Wouter van Gulik wrote: How do I do such a thing? Using the lower 8 bits is possible when loading a register so why not in a table? In the past, we've encountered other relocations that aren't handled by the avr port of binutils. It does look like

[avr-gcc-list] How to get low byte off a function address?

2008-01-19 Thread Wouter van Gulik
Dear list, How do I do this: main.c = void foo(void) { } char table[2] = { (foo), (foo), }; int main(int argc, char* argv[]) { int adr = table[argc]+0x3F00; ((void (*) (void))adr)(); return 0;

RE: [avr-gcc-list] How to get low byte off a function address?

2008-01-19 Thread Weddington, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Wouter van Gulik Sent: Saturday, January 19, 2008 8:16 AM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] How to get low byte off a function address? Dear list, How do I do