From d32cd1ee0bc674e0584750b4fd16b2f42fccddcb Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 7 Sep 2020 15:13:16 -0700 Subject: [PATCH] binutils: option to move default bases under 4GB msys2/MINGW-packages#6932 and msys2/MINGW-packages#6907 show packages have issues with the new default base addresses, so add an option to change back to the old defaults during the transition. --- .../0320-aslr-compat-base-addr.patch | 26 ---- .../2001-option-x64-default-bases-low.patch | 128 ++++++++++++++++++ mingw-w64-binutils/PKGBUILD | 10 +- 3 files changed, 135 insertions(+), 29 deletions(-) delete mode 100644 mingw-w64-binutils/0320-aslr-compat-base-addr.patch create mode 100644 mingw-w64-binutils/2001-option-x64-default-bases-low.patch diff --git a/mingw-w64-binutils/0320-aslr-compat-base-addr.patch b/mingw-w64-binutils/0320-aslr-compat-base-addr.patch deleted file mode 100644 index 5267066066d52..0000000000000 --- a/mingw-w64-binutils/0320-aslr-compat-base-addr.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- binutils-2.35/ld/emultempl/pep.em.orig 2020-08-27 08:46:36.064000100 +0200 -+++ binutils-2.35/ld/emultempl/pep.em 2020-08-27 09:00:44.598810700 +0200 -@@ -104,19 +104,19 @@ - #undef NT_EXE_IMAGE_BASE - #define NT_EXE_IMAGE_BASE \ - ((bfd_vma) (${move_default_addr_high} ? 0x100400000LL \ -- : 0x400000LL)) -+ : 0x140000000LL)) - #undef NT_DLL_IMAGE_BASE - #define NT_DLL_IMAGE_BASE \ - ((bfd_vma) (${move_default_addr_high} ? 0x400000000LL \ -- : 0x10000000LL)) -+ : 0x180000000LL)) - #undef NT_DLL_AUTO_IMAGE_BASE - #define NT_DLL_AUTO_IMAGE_BASE \ - ((bfd_vma) (${move_default_addr_high} ? 0x400000000LL \ -- : 0x61300000LL)) -+ : 0x1C0000000LL)) - #undef NT_DLL_AUTO_IMAGE_MASK - #define NT_DLL_AUTO_IMAGE_MASK \ - ((bfd_vma) (${move_default_addr_high} ? 0x1ffff0000LL \ -- : 0x0ffc0000LL)) -+ : 0x1ffff0000LL)) - #else - #undef NT_EXE_IMAGE_BASE - #define NT_EXE_IMAGE_BASE \ diff --git a/mingw-w64-binutils/2001-option-x64-default-bases-low.patch b/mingw-w64-binutils/2001-option-x64-default-bases-low.patch new file mode 100644 index 0000000000000..f14503e414350 --- /dev/null +++ b/mingw-w64-binutils/2001-option-x64-default-bases-low.patch @@ -0,0 +1,128 @@ +diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em +index ea792fe25a..de6d7aafbb 100644 +--- a/ld/emultempl/pep.em ++++ b/ld/emultempl/pep.em +@@ -107,18 +107,26 @@ fragment <