OSDN Git Service

We need text relocations r-x86
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 8 Mar 2018 04:30:36 +0000 (12:30 +0800)
committerMauro Rossi <issor.oruam@gmail.com>
Wed, 29 Dec 2021 08:58:40 +0000 (09:58 +0100)
Don't show annoying warnings.

linker/linker.cpp

index d480290..1fd631e 100644 (file)
@@ -3265,7 +3265,6 @@ bool soinfo::link_image(const SymbolLookupList& lookup_list, soinfo* local_group
                      "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,
@@ -3273,6 +3272,7 @@ bool soinfo::link_image(const SymbolLookupList& lookup_list, soinfo* local_group
                               "\"%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;