Clarify that JNI libraries used for jarjar'd classes must be statically linked.
This appears to be necessary for safety.
Change-Id: I1db3c38a5e4bbcfd1b785e310313ab25ef557280
Test: documentation-only change
diff --git a/staticlibs/native/README.md b/staticlibs/native/README.md
index 18d19c4..1f505c4 100644
--- a/staticlibs/native/README.md
+++ b/staticlibs/native/README.md
@@ -22,6 +22,9 @@
* Each module creates a native library in their directory, which statically links against the
common native library (e.g. libnet_utils_device_common_bpf), and calls the native registered
- function by hardcoding the post-jarjar class_name.
-
-
+ function by hardcoding the post-jarjar class_name. Linkage *MUST* be static because common
+ functions in the file (e.g., `register_com_android_net_module_util_BpfMap`) will appear in the
+ library (`.so`) file, and different versions of the library loaded in the same process by
+ different modules will in general have different versions. It's important that each of these
+ libraries loads the common function from its own library. Static linkage should guarantee this
+ because static linkage resolves symbols at build time, not runtime.
\ No newline at end of file