armlinux平台调用说明五、主要路径
来源: 网络用户发布,如有版权联系网管删除 2016-07-01
armlinux平台调用说明五、主要路径 1.用户空间:libc库没有研究代码,大体机制如下——
调用SWI汇编指令(x86上int $0x80))软中断进入内核,并传入中断向量号
相关中断向量号arm-2010.09/arm-none-linux-gnueabi/libc/usr/include/bits/syscall.h
#define SYS_getuid __NR_getuid
2.内核空间:ARM中系统调用号定义路径:kernel2.6.35.11/arch/arm/include/asm/unistd.h
#define __NR_getuid (__NR_SYSCALL_BASE+ 24)
异常进入内核空间函数路径:kernel2.6.35.11/arch/arm/kernel/entry-common.s
默认执行vector_SWI(x86上system_call())函数
ARM中系统调用表定义路径:kernel2.6.35.11/arch/arm/kernel/calls.S
CALL(sys_getuid) //第24个,要与前面unistd中对应
ARM中系统调用服务程序的声明路径:kernel2.6.35.11/include/linux/syscalls.h
asmlinkage long sys_getuid(void);
查看评论 回复