git: 68be9f4ea1db - stable/13 - arm, arm64: tweak hard-coded load addresses for PIE binaries

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 01 Nov 2022 00:46:21 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=68be9f4ea1dbd5ae644de3bfa663c68b7df30196

commit 68be9f4ea1dbd5ae644de3bfa663c68b7df30196
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-10-22 10:58:43 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-11-01 00:44:40 +0000

    arm, arm64: tweak hard-coded load addresses for PIE binaries
    
    (cherry picked from commit ca18304ea491263389b8b1239e9b5b21d80da7f5)
---
 sys/arm/include/elf.h   | 2 +-
 sys/arm64/include/elf.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/arm/include/elf.h b/sys/arm/include/elf.h
index affd4b349163..35d0fa55ca1a 100644
--- a/sys/arm/include/elf.h
+++ b/sys/arm/include/elf.h
@@ -78,7 +78,7 @@ __ElfType(Auxinfo);
 #define	EF_ARM_EABI_VERSION_UNKNOWN 0
 #define	EF_ARM_EABI_FREEBSD_MIN 4
 
-#define	ET_DYN_LOAD_ADDR	0x500000
+#define	ET_DYN_LOAD_ADDR 0x01001000
 
 /* Flags passed in AT_HWCAP. */
 #define	HWCAP_SWP		0x00000001	/* Unsupported, never set.    */
diff --git a/sys/arm64/include/elf.h b/sys/arm64/include/elf.h
index 3f7c3964d428..22e968c632bf 100644
--- a/sys/arm64/include/elf.h
+++ b/sys/arm64/include/elf.h
@@ -86,7 +86,7 @@ __ElfType(Auxinfo);
 #endif
 
 #if __ELF_WORD_SIZE == 32
-#define	ET_DYN_LOAD_ADDR 0x12000
+#define	ET_DYN_LOAD_ADDR 0x01001000
 #else
 #define	ET_DYN_LOAD_ADDR 0x100000
 #endif