4 #include "../../../config.h"
6 /* /usr/include/x86/elf.h AT_* defs */
13 Elf_AuxStr aux_map
[] = {
35 {"AT_PAGESIZESLEN", 21},
46 {"AT_PS_STRINGS", 32},
49 {"AT_USRSTACKBASE", 35},
50 {"AT_USRSTACKLIM", 36},
54 int main(int argc
, char* argv
[], char* envp
[])
58 while(*envp
++ != NULL
)
61 for (auxp
= (Elf_Auxinfo
*)envp
; auxp
->a_type
!= AT_NULL
; auxp
++)
63 aux_str
= &aux_map
[auxp
->a_type
];
64 fprintf(stderr
, "val: %s int: %02d ptr: 0x%lx\n", aux_str
->str_val
, aux_str
->type
, auxp
->a_un
.a_val
);
65 switch ( aux_str
->type
)
68 if (auxp
->a_un
.a_val
!= 0)
70 fprintf(stderr
, "EXECPATH: %s\n", (char*)auxp
->a_un
.a_val
);
75 if (auxp
->a_un
.a_val
!= 0)
77 fprintf(stderr
, "ARGV: %s\n", *(char**)auxp
->a_un
.a_val
);
83 if (auxp
->a_un
.a_val
!= 0)
85 /* can't leave this in regtest don't know what it
87 /*fprintf(stderr, "ENVV: %s\n", *(char**)auxp->a_un.a_val);*/
91 #if defined(AT_PS_STRINGS)
93 if (auxp
->a_un
.a_val
!= 0)
95 struct ps_strings
*ppss
= (struct ps_strings
*)auxp
->a_un
.a_val
;
96 fprintf(stderr
, "PS_STRINGS ARGV: %s\n", *ppss
->ps_argvstr
);
97 /* can't leave this in regtest don't know what it
99 /*fprintf(stderr, "PS_STRINGS ENVV: %s\n", *ppss->ps_envstr);*/