Skip to content

Commit

Permalink
Allow full relro on powerpc64-unknown-linux-gnu
Browse files Browse the repository at this point in the history
This was previously limited to partial relro, citing issues on RHEL6,
but that's no longer a supported platform since rust-lang#95026. We have long
been enabling full relro in RHEL7's own Rust builds for ppc64, without
trouble, so it should be fine to drop this workaround.
  • Loading branch information
cuviper committed Sep 21, 2022
1 parent cd8cc91 commit 5d80833
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
use crate::abi::Endian;
use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions};
use crate::spec::{LinkerFlavor, Target, TargetOptions};

pub fn target() -> Target {
let mut base = super::linux_gnu_base::opts();
base.cpu = "ppc64".into();
base.add_pre_link_args(LinkerFlavor::Gcc, &["-m64"]);
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;

Target {
llvm_target: "powerpc64-unknown-linux-gnu".into(),
pointer_width: 64,
Expand Down

0 comments on commit 5d80833

Please sign in to comment.