码迷,mamicode.com
首页 > 其他好文 > 详细

arm get_vector_swi_address

时间:2016-05-25 16:31:39      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:

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

arm get_vector_swi_address

标签:

原文地址:http://www.cnblogs.com/Y4ng/p/get_vector_swi_addr.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!