Skip to content

Commit

Permalink
Fix MS-Windows link switches for unexec
Browse files Browse the repository at this point in the history
* configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Disable ASLR
when linking for unexec.  Reported by Nikolay Kudryavtsev
<nikolay.kudryavtsev@gmail.com>.
  • Loading branch information
Eli-Zaretskii committed Apr 22, 2021
1 parent 3e41ecc commit 61828e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5560,6 +5560,10 @@ case "$opsys" in
x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;;
esac
## If they want unexec, disable Windows ASLR for the Emacs binary
if test "$with_dumping" = "unexec"; then
LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase -Wl,-disable-high-entropy-va -Wl,-default-image-base-low"
fi
;;

*) LD_SWITCH_SYSTEM_TEMACS= ;;
Expand Down

0 comments on commit 61828e5

Please sign in to comment.