[sanitizer] AndroidGetApiLevel for static executables.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 26 Sep 2018 23:48:13 +0000 (23:48 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 26 Sep 2018 23:48:13 +0000 (23:48 +0000)
commitf42aa29b68ae1bdf22549efde2844a070e82b4ec
tree12dceb071df0855c601eedc47d10d7ee3deb0108
parent0dae6369883ac99e8c2a0344cf3d9276e0cdd181
[sanitizer] AndroidGetApiLevel for static executables.

A version of AndroidGetApiLevel for static executables that is
completely compile-time.

The generic version uses dl_iterate_phdr which, even though it works
in static executables, crashes if called before libc is initialized.

llvm-svn: 343153
compiler-rt/lib/sanitizer_common/sanitizer_linux.cc