File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Top Open diff view settings
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Top Open diff view settings Original file line number Diff line number Diff line change @@ -1642,10 +1642,16 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
16421642 // Make the binary compatible with data execution prevention schemes.
16431643 cmd. add_no_exec ( ) ;
16441644
1645+ // OBJECT-FILES-YES
1646+ add_local_crate_metadata_objects ( cmd, crate_type, codegen_results) ;
1647+
16451648 // NO-OPT-OUT, OBJECT-FILES-NO
16461649 // Avoid linking to dynamic libraries unless they satisfy some undefined symbols
16471650 // at the point at which they are specified on the command line.
16481651 // Must be passed before any dynamic libraries.
1652+ // On solaris-like systems, this also will ignore unreferenced ELF sections
1653+ // from relocatable objects. For that reason, we move the metadata objects
1654+ // to before this flag as they would otherwise be removed.
16491655 cmd. add_as_needed ( ) ;
16501656
16511657 // NO-OPT-OUT, OBJECT-FILES-NO
@@ -1697,9 +1703,6 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
16971703 // dynamic library.
16981704 cmd. export_symbols ( tmpdir, crate_type) ;
16991705
1700- // OBJECT-FILES-YES
1701- add_local_crate_metadata_objects ( cmd, crate_type, codegen_results) ;
1702-
17031706 // OBJECT-FILES-YES
17041707 add_local_crate_allocator_objects ( cmd, codegen_results) ;
17051708
You can’t perform that action at this time.
0 commit comments