summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2016-01-11 15:23:15 -0800
committerHan Shen <shenhan@google.com>2016-01-12 13:36:17 -0800
commita95c2e5c5e5338f535c730b2333e797adf2872c0 (patch)
tree2c6bb0f1a50d9453e5ee9c7328a01f79a2c4194f /binutils-2.25/gold
parent3febaa7a3e7b8e89ef420c7984d60816798f1678 (diff)
downloadtoolchain_binutils-a95c2e5c5e5338f535c730b2333e797adf2872c0.tar.gz
toolchain_binutils-a95c2e5c5e5338f535c730b2333e797adf2872c0.tar.bz2
toolchain_binutils-a95c2e5c5e5338f535c730b2333e797adf2872c0.zip
Remove internal link in warning messages.
The go/unsafe-pie link should not appear in any warning messages, replace it with a little bit detail. Tested by building locally on ubuntu. Change-Id: I3e590108ec2c6c8917475b5d78cdabbfcf2833f7
Diffstat (limited to 'binutils-2.25/gold')
-rw-r--r--binutils-2.25/gold/layout.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/binutils-2.25/gold/layout.cc b/binutils-2.25/gold/layout.cc
index 18063a04..54b9dc35 100644
--- a/binutils-2.25/gold/layout.cc
+++ b/binutils-2.25/gold/layout.cc
@@ -2819,8 +2819,18 @@ Layout::finalize(const Input_objects* input_objects, Symbol_table* symtab,
if (data_seg_size >= target->max_pie_data_segment_size())
gold_warning(
- _("Unsafe PIE data segment size (%" PRIu64 " > %" PRIu64 "). See "
- "go/unsafe-pie."),
+ _("Unsafe PIE data segment size (%" PRIu64 " > %" PRIu64 "). "
+ "For kernels with CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE enabled, "
+ "load_elf_binary() attempts to map a PIE binary into an address "
+ "range immediately below mm->mmap_base. The first PT_LOAD segment "
+ "is mapped below mm->mmap_base, the subsequent PT_LOAD segment(s) "
+ "end up being mapped above mm->mmap_base into the area that is "
+ "supposed to be the \"gap\" between the stack and the binary. Since"
+ " the size of the \"gap\" on x86_64 is only guaranteed to be 128MB "
+ "this means that binaries with large data segments > 128MB can end "
+ "up mapping part of their data segment over their stack resulting "
+ "in corruption of the stack. Any PIE binary with a data segment > "
+ "128MB is vulnerable to this. It is suggested to turn off PIE."),
data_seg_size,
target->max_pie_data_segment_size());
}