about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-09-23 04:29:20 +0200
committerGitHub <noreply@github.com>2022-09-23 04:29:20 +0200
commit8e3b9bca65d7d79a3b0e9c33fed8d8c93dd66041 (patch)
treeef128e2196b5f2fc8c6c815e87eb17bde072e806
parent3148b3dc169044210dad95f3cca2365380f312a9 (diff)
parent5d8083360ad2065a5a412091f5f5b212565c45af (diff)
downloadrust-8e3b9bca65d7d79a3b0e9c33fed8d8c93dd66041.tar.gz
rust-8e3b9bca65d7d79a3b0e9c33fed8d8c93dd66041.zip
Rollup merge of #102112 - cuviper:powerpc64-full-relro, r=eholk
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.
-rw-r--r--compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs6
1 files changed, 1 insertions, 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 5413c4f33ff..1cb9ce40cb1 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,