#ifndef _LINUX_BINFMTS_H
#define _LINUX_BINFMTS_H
#include <linux/ptrace.h>
/*
* MAX_ARG_PAGES defines the number of pages allocated for arguments
* and envelope for the new program. 32 should suffice, this gives
* a maximum env+arg of 128kB !
*/
#define MAX_ARG_PAGES 32 //最大参数页
/*
* This structure is used to hold the arguments that are used when loading binaries.
*/
//linux二进制程序的参数结构体
struct linux_binprm{
char buf[128]; //128位的缓存
unsigned long page[MAX_ARG_PAGES]; //页数组
unsigned long p; //
int sh_bang; //sh
struct inode * inode; //程序点机构体指针
int e_uid, e_gid; //程序的uid,gid
int argc, envc; //程序的输入参数数和环境参数数
char * filename; /* Name of binary */
};
/* This structure defines the functions that are used to load the binary formats that
* linux accepts. */
//能够获取二进制格式函数
binfmts.h 头文件分析 \linux-1.0\linux\include\linux\binfmts.h
最新推荐文章于 2024-05-18 09:31:21 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)