unsigned long* get_vector_swi_addr() { const void *swi_addr = 0xFFFF0008; unsigned long vector_swi_offset = 0; unsigned long vector_swi_instruction = 0; unsigned long *vector_swi_addr_ptr = NULL; memcpy(&vector_swi_instruction, swi_addr, sizeof(vector_swi_instruction)); vector_swi_offset = vector_swi_instruction & (unsigned long)0x00000fff; vector_swi_addr_ptr = (unsigned long *)((unsigned long)swi_addr + vector_swi_offset + 8); return *vector_swi_addr_ptr; }
参考:
http://phrack.org/issues/68/6.htm
http://www.selinuxplus.com/?tag=sys_call_table