Skip to content

Commit 360a29d

Browse files
committed
stop disabling ASLR in normal Windows builds
Closes #16514
1 parent 9508faa commit 360a29d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/back/link.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,9 @@ fn link_args(cmd: &mut Command,
10241024

10251025
// Mark all dynamic libraries and executables as compatible with ASLR
10261026
// FIXME #17098: ASLR breaks gdb
1027-
// cmd.arg("-Wl,--dynamicbase");
1027+
if sess.opts.debuginfo == NoDebugInfo {
1028+
cmd.arg("-Wl,--dynamicbase");
1029+
}
10281030

10291031
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
10301032
// space available to x86 Windows binaries on x86_64.

0 commit comments

Comments
 (0)