From 5d8083360ad2065a5a412091f5f5b212565c45af Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 21 Sep 2022 11:53:50 -0700 Subject: [PATCH] Allow full relro on powerpc64-unknown-linux-gnu This was previously limited to partial relro, citing issues on RHEL6, but that's no longer a supported platform since #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. --- .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index 5413c4f33ff61..1cb9ce40cb1e5 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -1,5 +1,5 @@ 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(); @@ -7,10 +7,6 @@ pub fn target() -> Target { 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,