Skip to content

Commit

Permalink
Rollup merge of #114376 - inferiorhumanorgans:rustc-codegen-ssa-dupli…
Browse files Browse the repository at this point in the history
…cate-export, r=wesleywiser

Avoid exporting __rust_alloc_error_handler_should_panic more than once.

Exporting `__rust_alloc_error_handler_should_panic` multiple times causes `ld.gold` to balk with: `error: version script assignment of  to symbol __rust_alloc_error_handler_should_panic failed: symbol not defined`

Specifically this breaks builds of 1.70.0 and newer on DragonFly and YoctoProject with `ld.gold`.  Builds with `ld.bfd` and `lld` should be unaffected.

http://errors.yoctoproject.org/Errors/Details/708194/
  • Loading branch information
matthiaskrgr authored Aug 8, 2023
2 parents 443c316 + 2e29d85 commit 328e978
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions compiler/rustc_codegen_ssa/src/back/symbol_export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,6 @@ fn exported_symbols_provider_local(
));
}

symbols.push((
ExportedSymbol::NoDefId(SymbolName::new(tcx, OomStrategy::SYMBOL)),
SymbolExportInfo {
level: SymbolExportLevel::Rust,
kind: SymbolExportKind::Text,
used: false,
},
));

let exported_symbol =
ExportedSymbol::NoDefId(SymbolName::new(tcx, NO_ALLOC_SHIM_IS_UNSTABLE));
symbols.push((
Expand Down

0 comments on commit 328e978

Please sign in to comment.