arm, arm64: tweak hard-coded load addresses for PIE binaries
They are used when ASLR is not applied. The need for adjusting is due to rtld direct exec mode puts ld-elf.so.1 at the PIE load address, and this address must not conflict with the default linker' load address for non-PIE binaries. Otherwise rtld in direct mode cannot activate image. Example of implicit failure is ldd(1) refusing to run. Reported by: kp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37085
This commit is contained in:
parent
deb1e3b719
commit
ca18304ea4
@ -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. */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user