diff options
author | Elliott Hughes <enh@google.com> | 2018-05-01 11:27:46 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-05-01 11:27:46 -0700 |
commit | dc66073417134baa9397cc7ab687dabcc1f564b7 (patch) | |
tree | 5f9a734d2980dc7cae1596c2de72ffa617ba04f5 /android-changes-for-ndk-developers.md | |
parent | 67b5979930ba81477cf5f835b1fe23563ee9c761 (diff) |
Document the historical dlopen issues.
Bug: https://groups.google.com/forum/#!topic/android-ndk/OJxg_550eHE
Test: N/A
Change-Id: Ife066dcd3af89952f81f0aefc33351c59b83be9b
Diffstat (limited to 'android-changes-for-ndk-developers.md')
-rw-r--r-- | android-changes-for-ndk-developers.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/android-changes-for-ndk-developers.md b/android-changes-for-ndk-developers.md index e4eb48a85..1630db8e4 100644 --- a/android-changes-for-ndk-developers.md +++ b/android-changes-for-ndk-developers.md @@ -30,6 +30,21 @@ as toasts. Experience has shown that many developers don’t habitually check logcat for warnings until their app stops functioning, so the toasts help bring some visibility to the issues before it's too late. +## Changes to library dependency resolution + +Until it was [fixed](https://issuetracker.google.com/36950617) in +JB-MR2, Android didn't include the application library directory +on the dynamic linker's search path. This meant that apps +had to call `dlopen` or `System.loadLibrary` on all transitive +dependencies before loading their main library. Worse, until it was +[fixed](https://issuetracker.google.com/36935779) in JB-MR2, the +dynamic linker's caching code cached failures too, so it was necessary +to topologically sort your libraries and load them in reverse order. + +If you need to support Android devices running OS +versions older than JB-MR2, you might want to consider +[ReLinker](https://github.com/KeepSafe/ReLinker) which claims to solve +these problems automatically. ## Changes to library search order |