We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8693227 commit 9ebeb28Copy full SHA for 9ebeb28
compiler/rustc_codegen_ssa/src/back/link.rs
@@ -1691,6 +1691,12 @@ fn add_linked_symbol_object(
1691
return;
1692
};
1693
1694
+ // NOTE(nbdd0121): MSVC will hang if the input object file contains no sections,
1695
+ // so add an empty section.
1696
+ if file.format() == object::BinaryFormat::Coff {
1697
+ file.add_section(Vec::new(), ".text".into(), object::SectionKind::Text);
1698
+ }
1699
+
1700
for (sym, kind) in symbols.iter() {
1701
file.add_symbol(object::write::Symbol {
1702
name: sym.clone().into(),
0 commit comments