1 #include <sys/auxv.h> 2 #include <errno.h> 3 #include "libc.h" 4 __getauxval(unsigned long item)5unsigned long __getauxval(unsigned long item) 6 { 7 size_t *auxv = libc.auxv; 8 if (item == AT_SECURE) return libc.secure; 9 for (; *auxv; auxv+=2) 10 if (*auxv==item) return auxv[1]; 11 errno = ENOENT; 12 return 0; 13 } 14 15 weak_alias(__getauxval, getauxval); 16