1 #ifndef _LINUX_BINFMTS_H 2 #define _LINUX_BINFMTS_H 3 4 /* 5 * MAX_ARG_PAGES defines the number of pages allocated for arguments 6 * and envelope for the new program. 32 should suffice, this gives 7 * a maximum env+arg of 128kB ! 8 */ 9 #define MAX_ARG_PAGES 32 10 11 /* 12 * This structure is used to hold the arguments that are used when loading binaries. 13 */ 14 struct linux_binprm{ 15 char buf[128]; 16 unsigned long page[MAX_ARG_PAGES]; 17 unsigned long p; 18 struct inode * inode; 19 int e_uid, e_gid; 20 int argc, envc; 21 char * filename; /* Name of binary */ 22 }; 23 24 /* This structure defines the functions that are used to load the binary formats that 25 * linux accepts. */ 26 27 struct linux_binfmt{ 28 int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); 29 int (*load_shlib)(int fd); 30 }; 31 32 extern struct linux_binfmt formats[]; 33 34 35 36 #endif