[compiler-rt] [compiler-rt] Fixed Android 8.1 `getauxval(AT_PAGESZ)` crashes if called from `.preinit_array`. (#113427) (PR #116121)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 01:39:46 PST 2024


================
@@ -82,6 +82,12 @@
 #    include <sys/personality.h>
 #  endif
 
+#  if SANITIZER_ANDROID && __ANDROID_API__ < 35
+// The weak `strerrorname_np` (introduced in API level 35) definition,
+// allows for checking the API level at runtime.
----------------
fmayer wrote:

Yeah, we can't use anything in libc because we are running before libc is relocated. we can add this in a comment for clarity.

https://github.com/llvm/llvm-project/pull/116121


More information about the llvm-commits mailing list