auto merge of #16566 : thestinger/rust/aslr, r=pcwalton

This is enough for dynamic libraries, but not executables because MinGW
does not output a .reloc section even with `--dynamicbase`. It could
either be worked around by exporting a DLL symbol from the executable or
fixed in MinGW itself.
This commit is contained in:
bors 2014-08-18 02:31:11 +00:00
commit 3b65124063

View file

@ -1475,6 +1475,9 @@ fn link_args(cmd: &mut Command,
// Always enable DEP (NX bit) when it is available
cmd.arg("-Wl,--nxcompat");
// Mark all dynamic libraries and executables as compatible with ASLR
cmd.arg("-Wl,--dynamicbase");
}
if sess.targ_cfg.os == abi::OsAndroid {