about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa
diff options
context:
space:
mode:
authorAlex Zepeda <github@inferiorhumanorgans.com>2023-08-02 10:55:22 -0700
committerAlex Zepeda <github@inferiorhumanorgans.com>2023-08-02 11:02:23 -0700
commit2e29d85f7e88e06bb780d74749c156f03b2ff5f2 (patch)
tree9b7939384e411d648a98d1a61025d7aa4e13676d /compiler/rustc_codegen_ssa
parent866710c552e5a9b9ce6d0f8143ebe8d69f7dd451 (diff)
downloadrust-2e29d85f7e88e06bb780d74749c156f03b2ff5f2.tar.gz
rust-2e29d85f7e88e06bb780d74749c156f03b2ff5f2.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/symbol_export.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
index cbe7e519079..326b28ad104 100644
--- a/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
+++ b/compiler/rustc_codegen_ssa/src/back/symbol_export.rs
@@ -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((