How to declare some symbols used by JNI shared library weak in Android Studio NDK?
<p>I have a JNI shared library built using the experimental Gradle NDK plug-in for Android Studio, and this library links to some OS library symbols that only exist after a specific Android version.</p>

<p>How to I define these specific symbols to be weak linked, or as a fallback, make the entire OS library containing them weak linked? The intent is that the JNI library doesn't fail to load on these older OSes and the symbols are just <code>null</code> at run time.</p>

<p>Concrete example: <code>signal()</code> in <code>libc</code> doesn't appear to be available pre-4.0.</p>