Merge from master.

This commit is contained in:
Naoki Hamada
2014-07-31 18:30:39 +09:00
parent b58682dd73
commit 3fa6818962
5 changed files with 6 additions and 1 deletions

View File

@ -79,6 +79,7 @@ struct program_load_desc {
unsigned long at_phent; unsigned long at_phent;
unsigned long at_phnum; unsigned long at_phnum;
unsigned long at_entry; unsigned long at_entry;
unsigned long at_clktck;
char *args; char *args;
unsigned long args_len; unsigned long args_len;
char *envs; char *envs;

View File

@ -221,6 +221,7 @@ struct program_load_desc *load_elf(FILE *fp, char **interp_pathp)
desc->at_phent = sizeof(phdr); desc->at_phent = sizeof(phdr);
desc->at_phnum = hdr.e_phnum; desc->at_phnum = hdr.e_phnum;
desc->at_entry = hdr.e_entry; desc->at_entry = hdr.e_entry;
desc->at_clktck = sysconf(_SC_CLK_TCK);
return desc; return desc;
} }

View File

@ -91,7 +91,7 @@
#include <futex.h> #include <futex.h>
#include <rlimit.h> #include <rlimit.h>
#define AUXV_LEN 12 #define AUXV_LEN 14
struct vm_range { struct vm_range {
struct list_head list; struct list_head list;

View File

@ -119,6 +119,7 @@ struct program_load_desc {
unsigned long at_phent; unsigned long at_phent;
unsigned long at_phnum; unsigned long at_phnum;
unsigned long at_entry; unsigned long at_entry;
unsigned long at_clktck;
char *args; char *args;
unsigned long args_len; unsigned long args_len;
char *envs; char *envs;

View File

@ -1399,6 +1399,8 @@ int init_process_stack(struct process *process, struct program_load_desc *pn,
p[s_ind--] = AT_PHDR; p[s_ind--] = AT_PHDR;
p[s_ind--] = 4096; /* AT_PAGESZ */ p[s_ind--] = 4096; /* AT_PAGESZ */
p[s_ind--] = AT_PAGESZ; p[s_ind--] = AT_PAGESZ;
p[s_ind--] = pn->at_clktck; /* AT_CLKTCK */
p[s_ind--] = AT_CLKTCK;
/* save auxiliary vector for core dump */ /* save auxiliary vector for core dump */
memcpy(process->saved_auxv, &p[s_ind + 1], memcpy(process->saved_auxv, &p[s_ind + 1],
sizeof(process->saved_auxv)); sizeof(process->saved_auxv));