[compiler-rt] [CompilerRT][SanitizerCommon]Implement getauxval in FreeBSD (PR #186961)
David Chisnall via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 28 07:01:18 PDT 2026
================
@@ -54,6 +54,19 @@ static inline decltype(AuxInfo::a_v) getauxval(decltype(AuxInfo::a_type) type) {
return 0;
}
+#elif SANITIZER_FREEBSD
+
+# define SANITIZER_USE_GETAUXVAL 1
+# include <sys/auxv.h>
+static inline size_t getauxval(decltype(Elf_Auxinfo::a_type) type) {
+ for (const Elf_Auxinfo* aux = (const Elf_Auxinfo*)libsys_elf_aux_vec_addr();
----------------
davidchisnall wrote:
Where does this function come from? It isn't there [in the header](https://github.com/freebsd/freebsd-src/blob/bea1c2fcd7839fd90a8ce96d6dc6a033779bc3c2/sys/sys/auxv.h#L36).
https://github.com/llvm/llvm-project/pull/186961
More information about the llvm-commits
mailing list