eugenis added a comment. preinit_array can not be used in a shared library. A library can use -z initfirst, but we probably don't want to go there, and it's not supported on Android. Let's leave it like this. https://reviews.llvm.org/D31947