Using C arrays in assembly in ARM.

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mindentropy
Member
Member
Posts: 42
Joined: Thu Jan 13, 2011 3:33 pm

Using C arrays in assembly in ARM.

Post 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?
Post Reply