have_privs is unused and should be removed
check_for_privs
is used (only) to initialise have_privs
, and have_privs
is never used anywhere. It is declared in proc/sysinfo.h
, but this seems like a historical mistake, as it does not seem like the kind of thing that should be part of the public API, and, indeed, https://codesearch.debian.net/search?q=have_privs&literal=1 shows zero uses of it. It should therefore be removed, along with the unnecessary check_for_privs
, leaving the Linux-specific AT_CLKTCK
code as the only thing looking at auxargs (which, I might add, are not "ELF notes" despite what the comments say and the name of find_elf_note
; ELF notes are a very different thing, sections of type SHT_NOTE that are covered by PT_NOTE segments, used to brand binaries in various ways, such as what OS and version they require, what architectural features, or various control information like whether the binary requires ASLR to be disabled).