Brad Smith brad@comstyle.com writes:
elf_aux_info() returns an errno value (0 on success) rather than -1 with errno set. Ignoring the return value means the result is unreliable on failure. Treat a failure as "no features reported" so the generic code is used.
The variables are explicitly initialized to zero. I would expected that elf_aux_info leaves them unchanged on failure, i.e., they stay zero.
So I'm curious both on the conditions that might make an elf_aux_info call for AT_HWCAP or AT_HWCAP2 fail, and if it really clobbers the output buffer on failure (which seems like a rather rude api to me)?
Regards, /Niels