aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2022-10-22 20:03:17 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-10-25 16:00:44 +0000
commit5f00525dfca4b1fbb0f8296a411bf57c23bce694 (patch)
tree393d512b33ece3f9b34c524e9cadb95b2691c4bf /sys
parentca18304ea491263389b8b1239e9b5b21d80da7f5 (diff)
downloadsrc-5f00525dfca4b1fbb0f8296a411bf57c23bce694.tar.gz
src-5f00525dfca4b1fbb0f8296a411bf57c23bce694.zip
i386: move hard-coded load address for PIE below default linker base
both for i386 native and compat32 amd64. We know the ld-elf.so.1 size in advance, it fits there. Trying to push it up after the end of a binary cannot work reliably and eventually fail for large binaries. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37085
Diffstat (limited to 'sys')
-rw-r--r--sys/x86/include/elf.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/x86/include/elf.h b/sys/x86/include/elf.h
index e587b52202e8..e8744858e4b7 100644
--- a/sys/x86/include/elf.h
+++ b/sys/x86/include/elf.h
@@ -89,7 +89,7 @@ __ElfType(Auxinfo);
#define ELF_TARG_MACH EM_386
#define ELF_TARG_VER 1
-#define ET_DYN_LOAD_ADDR 0x01001000
+#define ET_DYN_LOAD_ADDR 0x00002000
#elif defined(__amd64__)
@@ -150,7 +150,7 @@ __ElfType(Auxinfo);
#define ELF_TARG_VER 1
#if __ELF_WORD_SIZE == 32
-#define ET_DYN_LOAD_ADDR 0x01001000
+#define ET_DYN_LOAD_ADDR 0x00002000
#else
#define ET_DYN_LOAD_ADDR 0x01021000
#endif