summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@fluxnic.net>2010-08-20 22:14:46 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-10-08 11:02:53 +0200
commite4eab08d6050ad04d960738f589724204fd1064c (patch)
tree8dbe00cf2c207fc2e448eaee8a763bad01e39551 /fs/binfmt_elf.c
parentARM: 6368/1: move the PrimeCell IDs to use macros (diff)
downloadlinux-e4eab08d6050ad04d960738f589724204fd1064c.tar.xz
linux-e4eab08d6050ad04d960738f589724204fd1064c.zip
ARM: 6342/1: fix ASLR of PIE executables
Since commits 990cb8acf2 and cc92c28b2d, it is possible to have full address space layout randomization (ASLR) on ARM. Except that one small change was missing for ASLR of PIE executables. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 535e763ab1a6..6884e198e0c7 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -800,7 +800,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
* default mmap base, as well as whatever program they
* might try to exec. This is because the brk will
* follow the loader, and is not movable. */
-#ifdef CONFIG_X86
+#if defined(CONFIG_X86) || defined(CONFIG_ARM)
load_bias = 0;
#else
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);