Revert "Remove text-relocs support for apps targeting M+"
This reverts commit 3e6f7807541bab8157f9c26e55829fd193683349.
Conflicts:
linker/linker.cpp
Change-Id: I72dd9765946ac6554aab607daf7754ab4d5ac01b
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 3d6fdf9..6e41e7d 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3357,16 +3357,6 @@
#if !defined(__LP64__)
if (has_text_relocations) {
- // Fail if app is targeting M or above.
-#if defined(TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS)
- if (get_application_target_sdk_version() != __ANDROID_API__
- && get_application_target_sdk_version() >= __ANDROID_API_M__) {
-#else
- if (get_application_target_sdk_version() >= __ANDROID_API_M__) {
-#endif
- DL_ERR_AND_LOG("\"%s\" has text relocations", get_realpath());
- return false;
- }
// Make segments writable to allow text relocations to work properly. We will later call
// phdr_table_protect_segments() after all of them are applied.
DL_WARN("\"%s\" has text relocations. This is wasting memory and prevents "