Skip to content

Commit 859407e

Browse files
committed
rollup merge of #17363 : thestinger/aslr
2 parents 6fe4467 + 360a29d commit 859407e

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
@@ -1028,7 +1028,9 @@ fn link_args(cmd: &mut Command,
10281028

10291029
// Mark all dynamic libraries and executables as compatible with ASLR
10301030
// FIXME #17098: ASLR breaks gdb
1031-
// cmd.arg("-Wl,--dynamicbase");
1031+
if sess.opts.debuginfo == NoDebugInfo {
1032+
cmd.arg("-Wl,--dynamicbase");
1033+
}
10321034

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

0 commit comments

Comments
 (0)