mirror of https://github.com/rust-lang/rust.git
Make partial RELRO default on ppc64 due to segfault
On at least RHEL6 there is a segfault caused by the older ld.so version when BIND_NOW is used, so use partial RELRO by default on ppc64 architectures for now. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
This commit is contained in:
parent
94b9cc90fb
commit
ecf3f6d4de
|
@ -9,7 +9,7 @@
|
|||
// except according to those terms.
|
||||
|
||||
use LinkerFlavor;
|
||||
use target::{Target, TargetResult};
|
||||
use target::{Target, TargetResult, RelroLevel};
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::linux_base::opts();
|
||||
|
@ -17,6 +17,10 @@ pub fn target() -> TargetResult {
|
|||
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
|
||||
base.max_atomic_width = Some(64);
|
||||
|
||||
// ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
|
||||
// for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474
|
||||
base.relro_level = RelroLevel::Partial;
|
||||
|
||||
// see #36994
|
||||
base.exe_allocation_crate = None;
|
||||
|
||||
|
|
Loading…
Reference in New Issue