1#include <errno.h>
2#include <sys/auxv.h>
3#include <sys/param.h>
4
5unsigned long getauxval(unsigned long item) {
6    // We have no auxv, so just special-case a few things we do know about.
7    // TODO(mcgrathr): Maybe handle some more values?  It's unclear what
8    // any users want other than AT_HWCAP, which we don't have.
9
10    switch (item) {
11    case AT_SECURE:
12        return 0ul;
13    case AT_PAGESZ:
14        return PAGE_SIZE;
15    }
16
17    errno = ENOENT;
18    return 0;
19}
20