Page 1 of 1

Using C arrays in assembly in ARM.

Posted: Thu Nov 19, 2015 12:14 pm
by mindentropy
This might be a stupid question but I want to jump to a function in my interrupt handler. For the function jump I want to have a table of function pointers of interrupt handlers. I have defined this table as

Code: Select all

void (*interrupt_handler_jmp_table[NUM_OF_INTERRUPT_SRCS])(void);
I want to reference this jump table in assembly and do a branch to the particular offset in the jump table, the table being the interrupt offset. The problem is how can I reference this symbol in assembly? I am using gcc and could find the .import directive but not in ARM port.

One more question is if I do a jump using this method is it OK to use __attribute__((naked)) for the handlers?