Commit 774b2fbf authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by Commit Bot

android: Do not disable chromium linker on Android N+.

This was previously disabled because the GVR APK was loading
its library with the system dlopen(), then passing the handle
to code in libchrome.so, which happened to call the crazy linker
dlsym() wrapper with it. This resulted in runtime crashes until
a work-around was added in [1].

The Java check was never removed though, so this CL does it.

[1] https://chromium-review.googlesource.com/885763

BUG=895194
R=agrieve@chromium.org, pasko@chromium.org

Change-Id: If742399452336d349eb763a76357a38a72f6707e
Reviewed-on: https://chromium-review.googlesource.com/c/1319589Reviewed-by: default avataragrieve <agrieve@chromium.org>
Reviewed-by: default avatarEgor Pasko <pasko@chromium.org>
Commit-Queue: David Turner <digit@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605680}
parent 683a3487
......@@ -143,20 +143,6 @@ public class LibraryLoader {
* libraries instead.
*/
public static boolean useCrazyLinker() {
// TODO(digit): Remove this early return GVR is loadable.
// A non-monochrome APK (such as ChromePublic.apk or ChromeModernPublic.apk) on N+ cannot
// use the Linker because the latter is incompatible with the GVR library. Fall back
// to using System.loadLibrary() or System.load() at the cost of no RELRO sharing.
//
// A non-monochrome APK (such as ChromePublic.apk) can be installed on N+ in these
// circumstances:
// * installing APK manually
// * after OTA from M to N
// * side-installing Chrome (possibly from another release channel)
// * Play Store bugs leading to incorrect APK flavor being installed
//
if (Build.VERSION.SDK_INT >= VERSION_CODES.N) return false;
// The auto-generated NativeLibraries.sUseLinker variable will be true if the
// build has not explicitly disabled Linker features.
return NativeLibraries.sUseLinker;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment