add a AT_ENTRY entry to the auxiliary vector
This commit is contained in:
@@ -45,6 +45,7 @@ struct program_load_desc {
|
||||
unsigned long at_phdr;
|
||||
unsigned long at_phent;
|
||||
unsigned long at_phnum;
|
||||
unsigned long at_entry;
|
||||
char *args;
|
||||
unsigned long args_len;
|
||||
char *envs;
|
||||
|
||||
@@ -152,6 +152,7 @@ struct program_load_desc *load_elf(FILE *fp)
|
||||
desc->at_phdr = load_addr + hdr.e_phoff;
|
||||
desc->at_phent = sizeof(phdr);
|
||||
desc->at_phnum = hdr.e_phnum;
|
||||
desc->at_entry = hdr.e_entry;
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ struct program_load_desc {
|
||||
unsigned long at_phdr;
|
||||
unsigned long at_phent;
|
||||
unsigned long at_phnum;
|
||||
unsigned long at_entry;
|
||||
char *args;
|
||||
unsigned long args_len;
|
||||
char *envs;
|
||||
|
||||
@@ -866,6 +866,8 @@ int init_process_stack(struct process *process, struct program_load_desc *pn,
|
||||
s_ind = -1;
|
||||
p[s_ind--] = 0; /* AT_NULL */
|
||||
p[s_ind--] = 0;
|
||||
p[s_ind--] = pn->at_entry; /* AT_ENTRY */
|
||||
p[s_ind--] = AT_ENTRY;
|
||||
p[s_ind--] = pn->at_phnum; /* AT_PHNUM */
|
||||
p[s_ind--] = AT_PHNUM;
|
||||
p[s_ind--] = pn->at_phent; /* AT_PHENT */
|
||||
|
||||
Reference in New Issue
Block a user