getauxptr/getauxval should be using a struct with a union
The current ABI has Elf_Auxv as a struct with a union for the int and pointer, meaning this code is wrong for big-endian (and also a strict-aliasing violation in general). Similarly a_type is a plain integer always in the lower bytes of memory. This (and __getauxval) should be using a proper struct.
Ideally they'd also give ENOENT or something if the wrong interface is asked for a given entry (i.e. you ask getauxval for AT_BASE on Morello, or getauxptr for AT_HWCAP).