Revision e5fe0c52 linux-user/qemu.h

b/linux-user/qemu.h
18 18
struct image_info {
19 19
	unsigned long	start_code;
20 20
	unsigned long	end_code;
21
        unsigned long   start_data;
21 22
	unsigned long	end_data;
22 23
	unsigned long	start_brk;
23 24
	unsigned long	brk;
......
25 26
	unsigned long	mmap;
26 27
	unsigned long	rss;
27 28
	unsigned long	start_stack;
28
	unsigned long	arg_start;
29
	unsigned long	arg_end;
30
	unsigned long	env_start;
31
	unsigned long	env_end;
32 29
	unsigned long	entry;
33 30
	int		personality;
34 31
};
......
82 79
extern TaskState *first_task_state;
83 80
extern const char *qemu_uname_release;
84 81

  
85
int elf_exec(const char * filename, char ** argv, char ** envp, 
82
/* ??? See if we can avoid exposing so much of the loader internals.  */
83
/*
84
 * MAX_ARG_PAGES defines the number of pages allocated for arguments
85
 * and envelope for the new program. 32 should suffice, this gives
86
 * a maximum env+arg of 128kB w/4KB pages!
87
 */
88
#define MAX_ARG_PAGES 32
89

  
90
/*
91
 * This structure is used to hold the arguments that are 
92
 * used when loading binaries.
93
 */
94
struct linux_binprm {
95
        char buf[128];
96
        void *page[MAX_ARG_PAGES];
97
        unsigned long p;
98
	int fd;
99
        int e_uid, e_gid;
100
        int argc, envc;
101
        char **argv;
102
        char **envp;
103
        char * filename;        /* Name of binary */
104
};
105

  
106
void do_init_thread(struct target_pt_regs *regs, struct image_info *infop);
107
target_ulong loader_build_argptr(int envc, int argc, target_ulong sp,
108
                                 target_ulong stringp, int push_ptr);
109
int loader_exec(const char * filename, char ** argv, char ** envp, 
86 110
             struct target_pt_regs * regs, struct image_info *infop);
87 111

  
112
int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
113
                    struct image_info * info);
114
int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
115
                    struct image_info * info);
116

  
117
void memcpy_to_target(target_ulong dest, const void *src,
118
                      unsigned long len);
88 119
void target_set_brk(target_ulong new_brk);
89 120
long do_brk(target_ulong new_brk);
90 121
void syscall_init(void);

Also available in: Unified diff