@@ -219,13 +219,18 @@ fn exported_symbols_provider_local<'tcx>(
219219
220220 // Mark allocator shim symbols as exported only if they were generated.
221221 if allocator_kind_for_codegen ( tcx) . is_some ( ) {
222- for symbol_name in ALLOCATOR_METHODS
222+ for ( symbol_name, export_kind ) in ALLOCATOR_METHODS
223223 . iter ( )
224- . map ( |method| mangle_internal_symbol ( tcx, global_fn_name ( method. name ) . as_str ( ) ) )
224+ . map ( |method| {
225+ (
226+ mangle_internal_symbol ( tcx, global_fn_name ( method. name ) . as_str ( ) ) ,
227+ SymbolExportKind :: Text ,
228+ )
229+ } )
225230 . chain ( [
226- mangle_internal_symbol ( tcx, "__rust_alloc_error_handler" ) ,
227- mangle_internal_symbol ( tcx, OomStrategy :: SYMBOL ) ,
228- mangle_internal_symbol ( tcx, NO_ALLOC_SHIM_IS_UNSTABLE ) ,
231+ ( mangle_internal_symbol ( tcx, "__rust_alloc_error_handler" ) , SymbolExportKind :: Text ) ,
232+ ( mangle_internal_symbol ( tcx, OomStrategy :: SYMBOL ) , SymbolExportKind :: Data ) ,
233+ ( mangle_internal_symbol ( tcx, NO_ALLOC_SHIM_IS_UNSTABLE ) , SymbolExportKind :: Text ) ,
229234 ] )
230235 {
231236 let exported_symbol = ExportedSymbol :: NoDefId ( SymbolName :: new ( tcx, & symbol_name) ) ;
@@ -234,7 +239,7 @@ fn exported_symbols_provider_local<'tcx>(
234239 exported_symbol,
235240 SymbolExportInfo {
236241 level : SymbolExportLevel :: Rust ,
237- kind : SymbolExportKind :: Text ,
242+ kind : export_kind ,
238243 used : false ,
239244 rustc_std_internal_symbol : true ,
240245 } ,
0 commit comments