Skip to content

Commit 2e29d85

Browse files
author
Alex Zepeda
committed
Avoid exporting symbols 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 on DragonFly and YoctoProject with ld.gold. Builds with ld.bfd should be unaffected.
1 parent 866710c commit 2e29d85

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compiler/rustc_codegen_ssa/src/back/symbol_export.rs

-9
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,6 @@ fn exported_symbols_provider_local(
233233
));
234234
}
235235

236-
symbols.push((
237-
ExportedSymbol::NoDefId(SymbolName::new(tcx, OomStrategy::SYMBOL)),
238-
SymbolExportInfo {
239-
level: SymbolExportLevel::Rust,
240-
kind: SymbolExportKind::Text,
241-
used: false,
242-
},
243-
));
244-
245236
let exported_symbol =
246237
ExportedSymbol::NoDefId(SymbolName::new(tcx, NO_ALLOC_SHIM_IS_UNSTABLE));
247238
symbols.push((

0 commit comments

Comments
 (0)