System.loadLibrary goes to the bridge (the translator's remap table sends it there). The bridge loads a library as
bionic's linker does:
PT_LOAD segments are mapped into the code window, a reservation of the host's address space that holds
every guest library. The dispatch table covers the window, one slot for each 4 bytes.DT_NEEDED libraries load first: the app's own from its library folder, the system's as HLE libraries
(their symbols are host functions).R_AARCH64_RELATIVE, ABS64, GLOB_DAT, JUMP_SLOT and IRELATIVE. Lookups go through the GNU and
SysV hash tables, in the order of the global group, then the library's own DT_NEEDED tree.DT_INIT and DT_INIT_ARRAY run, then JNI_OnLoad.The app's libraries have no PT_TLS, so static TLS is not needed yet. dlopen and dlsym of guest code are the
same loader.
Made from docs/platforms/android-apps/native.md at 69237645142c. GPL-3.0-or-later.