Skip to content

Commit f7dd70c

Browse files
committed
Auto merge of rust-lang#115267 - nikic:revert-elf-relaxation, r=compiler-errors
Revert relax_elf_relocations default change This reverts commit 4410868 (rust-lang#106511). The change caused linker failures with the binutils version used by cross (rust-lang#115239), as well as miscompilations when using the mold linker (https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479).
2 parents 3f8c8f5 + 1b7cf24 commit f7dd70c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ fn test_unstable_options_tracking_hash() {
822822
tracked!(profile_emit, Some(PathBuf::from("abc")));
823823
tracked!(profile_sample_use, Some(PathBuf::from("abc")));
824824
tracked!(profiler_runtime, "abc".to_string());
825-
tracked!(relax_elf_relocations, Some(false));
825+
tracked!(relax_elf_relocations, Some(true));
826826
tracked!(relro_level, Some(RelroLevel::Full));
827827
tracked!(remap_cwd_prefix, Some(PathBuf::from("abc")));
828828
tracked!(report_delayed_bugs, true);

Diff for: compiler/rustc_target/src/spec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ impl Default for TargetOptions {
22162216
mcount: "mcount".into(),
22172217
llvm_mcount_intrinsic: None,
22182218
llvm_abiname: "".into(),
2219-
relax_elf_relocations: true,
2219+
relax_elf_relocations: false,
22202220
llvm_args: cvs![],
22212221
use_ctors_section: false,
22222222
eh_frame_header: true,

Diff for: compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ pub fn target() -> Target {
6969
position_independent_executables: true,
7070
pre_link_args,
7171
override_export_symbols: Some(EXPORT_SYMBOLS.iter().cloned().map(Cow::from).collect()),
72+
relax_elf_relocations: true,
7273
..Default::default()
7374
};
7475
Target {

0 commit comments

Comments
 (0)