diff options
author | Georg Kotheimer <georg.kotheimer@kernkonzept.com> | 2025-03-03 16:41:14 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2025-03-04 07:43:56 +0100 |
commit | 737a0edf4d2d52c6c2836ffe24c7143b63498123 (patch) | |
tree | 6eaa7464c70ef9a9bb088f36a20b8bda20b86174 /libc/misc/elf/dl-support.c | |
parent | 227b7c825b6c79479f7222be03e83991b927da26 (diff) |
Support non-cached entries in getauxval
Previously the getauxval implementation was limited to the auxiliary
vector entries cached in _dl_auxvt. To also support entries outside of
that cached subset, store the start address of the auxiliary vector,
and if an uncached entry type is encountered search the entire auxiliary
vector.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'libc/misc/elf/dl-support.c')
-rw-r--r-- | libc/misc/elf/dl-support.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c index 81c78fa55..09cbefc18 100644 --- a/libc/misc/elf/dl-support.c +++ b/libc/misc/elf/dl-support.c @@ -33,10 +33,13 @@ size_t _dl_phnum; size_t _dl_pagesize; ElfW(auxv_t) _dl_auxvt[AUX_MAX_AT_ID]; +ElfW(auxv_t) *_dl_auxv_start; void internal_function _dl_aux_init (ElfW(auxv_t) *av); void internal_function _dl_aux_init (ElfW(auxv_t) *av) { + _dl_auxv_start = av; + memset(_dl_auxvt, 0x00, sizeof(_dl_auxvt)); for (; av->a_type != AT_NULL; av++) { |