We need text relocations
Don't show annoying warnings.
diff --git a/linker/linker.cpp b/linker/linker.cpp
index ab1501b..d2e24be 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3336,7 +3336,6 @@
"Enforced-for-API-level-23)", get_realpath());
return false;
}
-#endif
// 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_documented_change(23,
@@ -3344,6 +3343,7 @@
"\"%s\" has text relocations",
get_realpath());
add_dlwarning(get_realpath(), "text relocations");
+#endif
if (phdr_table_unprotect_segments(phdr, phnum, load_bias) < 0) {
DL_ERR("can't unprotect loadable segments for \"%s\": %s", get_realpath(), strerror(errno));
return false;