git: 5f00525dfca4 - main - i386: move hard-coded load address for PIE below default linker base

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 25 Oct 2022 16:00:53 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5f00525dfca4b1fbb0f8296a411bf57c23bce694

commit 5f00525dfca4b1fbb0f8296a411bf57c23bce694
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-10-22 20:03:17 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-10-25 16:00:44 +0000

    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
---
 sys/x86/include/elf.h | 4 ++--
 1 file 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