about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-09-19 10:00:41 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-09-19 10:00:41 -0700
commit859407e1ef38792b17883e5052e42828cb6b9e65 (patch)
tree673aec20cd43e175c9bd48709d89dcc35f6d2087
parent6fe4467188371004d35baa155316083da61d238a (diff)
parent360a29d9c93086fe34222c42b59f46ab6e0fb14c (diff)
downloadrust-859407e1ef38792b17883e5052e42828cb6b9e65.tar.gz
rust-859407e1ef38792b17883e5052e42828cb6b9e65.zip
rollup merge of #17363 : thestinger/aslr
-rw-r--r--src/librustc/back/link.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
index ddaafab7b38..d31e19b4467 100644
--- a/src/librustc/back/link.rs
+++ b/src/librustc/back/link.rs
@@ -1028,7 +1028,9 @@ fn link_args(cmd: &mut Command,
 
         // Mark all dynamic libraries and executables as compatible with ASLR
         // FIXME #17098: ASLR breaks gdb
-        // cmd.arg("-Wl,--dynamicbase");
+        if sess.opts.debuginfo == NoDebugInfo {
+            cmd.arg("-Wl,--dynamicbase");
+        }
 
         // Mark all dynamic libraries and executables as compatible with the larger 4GiB address
         // space available to x86 Windows binaries on x86_64.