Skip to content

Commit

Permalink
Auto merge of rust-lang#115267 - nikic:revert-elf-relaxation, r=compi…
Browse files Browse the repository at this point in the history
…ler-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).
  • Loading branch information
bors committed Aug 28, 2023
2 parents 3f8c8f5 + 1b7cf24 commit f7dd70c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ fn test_unstable_options_tracking_hash() {
tracked!(profile_emit, Some(PathBuf::from("abc")));
tracked!(profile_sample_use, Some(PathBuf::from("abc")));
tracked!(profiler_runtime, "abc".to_string());
tracked!(relax_elf_relocations, Some(false));
tracked!(relax_elf_relocations, Some(true));
tracked!(relro_level, Some(RelroLevel::Full));
tracked!(remap_cwd_prefix, Some(PathBuf::from("abc")));
tracked!(report_delayed_bugs, true);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@ impl Default for TargetOptions {
mcount: "mcount".into(),
llvm_mcount_intrinsic: None,
llvm_abiname: "".into(),
relax_elf_relocations: true,
relax_elf_relocations: false,
llvm_args: cvs![],
use_ctors_section: false,
eh_frame_header: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub fn target() -> Target {
position_independent_executables: true,
pre_link_args,
override_export_symbols: Some(EXPORT_SYMBOLS.iter().cloned().map(Cow::from).collect()),
relax_elf_relocations: true,
..Default::default()
};
Target {
Expand Down

0 comments on commit f7dd70c

Please sign in to comment.