From 35a066ea5bf97bc12577bf4f8f3f5841ec07038f Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Mon, 22 Oct 2018 17:48:13 -0700 Subject: [PATCH] Revert "ANDROID: Revert "arm: move ELF_ET_DYN_BASE to 4MB"" This reverts commit 040c05c6e4f823a86d49fe87a480d32b884d7bce. ASan can handle the new memory layout in Android P and later, which means this change can be reverted in 4.14. Bug: 67425063 Signed-off-by: Evgenii Stepanov Change-Id: I128de2797bca0bc17fe991e1cb48788ecf5f25de --- arch/arm/include/asm/elf.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index 51f0d2417fa9..8c5ca92a87a9 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -113,12 +113,8 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); #define CORE_DUMP_USE_REGSET #define ELF_EXEC_PAGESIZE 4096 -/* This is the location that an ET_DYN program is loaded if exec'ed. Typical - use of this is to invoke "./ld.so someprog" to test out a new version of - the loader. We need to make sure that it is out of the way of the program - that it will "exec", and that there is sufficient room for the brk. */ - -#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) +/* This is the base location for PIE (ET_DYN with INTERP) loads. */ +#define ELF_ET_DYN_BASE 0x400000UL /* When the program starts, a1 contains a pointer to a function to be registered with atexit, as per the SVR4 ABI. A value of 0 means we