summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-04-10 09:52:33 -0700
committerElliott Hughes <enh@google.com>2017-04-10 16:41:52 -0700
commit763f6e108a95fc8eb43e65a626351690cd98227b (patch)
tree0be2dfd8b46af2637479230a7c31487085988dca /linker/linker.cpp
parent2d389ffee98b6f480f4340ec408d37457e02fbd7 (diff)
Send developers straight to the text relocation docs.
It's been years since we allowed text relocations, but I had a developer ask me how to fix them at last week's O Developer Day. They'd never seen our docs, so let's try to fix that for anyone else who's still confused... Bug: N/A Test: builds Change-Id: I9202a7b0a3f024041b646c43c87585f4fab22d09
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 2777d7384..f52c2f357 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3251,13 +3251,16 @@ bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t&
if (has_text_relocations) {
// Fail if app is targeting M or above.
if (get_application_target_sdk_version() >= __ANDROID_API_M__) {
- DL_ERR_AND_LOG("\"%s\" has text relocations", get_realpath());
+ DL_ERR_AND_LOG("\"%s\" has text relocations (https://android.googlesource.com/platform/"
+ "bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-"
+ "Enforced-for-API-level-23)", 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 "
- "security hardening. Please fix.", get_realpath());
+ DL_WARN("\"%s\" has text relocations (https://android.googlesource.com/platform/"
+ "bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-"
+ "for-API-level-23)", get_realpath());
add_dlwarning(get_realpath(), "text relocations");
if (phdr_table_unprotect_segments(phdr, phnum, load_bias) < 0) {
DL_ERR("can't unprotect loadable segments for \"%s\": %s",