From 613f4ee841ab6932a7c900d770765e42458d4d46 Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Thu, 10 Sep 2020 10:28:28 -0700 Subject: [PATCH] ld option to move default bases under 4GB. Some (buggy) programs have 'latent pointer truncation' issues, and setting the ImageBase below 4GB indicates to Windows that it's not safe to relocate these using ASLR in such a way as to trigger them. --- ld/emultempl/pep.em | 50 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index c6fd8b8f8d9..312f8d6d566 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -132,18 +132,26 @@ fragment <