在Linux中GNU的名词解释,在linux中,如何通过GNU程序集进行系统调用_linux_开发99编程知识库...

通過一些元數據和腳本生成sys調用存根,或者直接使用 ,可以使用類似android和的方法。

下面是仿生學的libc/syscalls 。txt# this file is used to list all the syscalls that will be supported by

# the Bionic C library. It is used to automatically generate the syscall

# stubs, the list of syscall constants (__NR_xxxx) and the content of

#

# each non comment line has the following format:

#

# return_type func_name[:syscall_name[:call_id]]([parameter_list]) (syscall_number|"stub")

#

# note that:

# - syscall_name correspond to the name of the syscall, which may differ from

# the exported function name (example: the exit syscall is implemented by the _exit()

# function, which is not the same as the standard C exit() function which calls it)

# The call_id parameter, given that func_name and syscall_name have

# been provided, allows the user to specify dispatch style syscalls.

# For example, socket() syscall on i386 actually becomes:

# socketcall(__NR_socket, 1, *(rest of args on stack)).

#

# - each parameter type is assumed to be stored on 32 bits, there is no plan to support

# 64-bit architectures at the moment

#

# - it there is"stub" instead of a syscall number, the tool will not generate any

# assembler template for the syscall; it's up to the bionic implementation to provide

# a relevant C stub

#

# - additionally, if the syscall number is different amoung ARM, and x86, MIPS use:

# return_type funcname[:syscall_name](parameters) arm_number,x86_number,mips_number

#

# the file is processed by a python script named gensyscalls.py

#

# process management

void _exit:exit_group (int) 248,252,246

void _exit_thread:exit (int) 1

pid_t __fork:fork (void) 2

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值