Fix MSVC hang issue
This commit is contained in:
parent
8693227e5e
commit
9ebeb284b5
1 changed files with 6 additions and 0 deletions
|
@ -1691,6 +1691,12 @@ fn add_linked_symbol_object(
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// NOTE(nbdd0121): MSVC will hang if the input object file contains no sections,
|
||||||
|
// so add an empty section.
|
||||||
|
if file.format() == object::BinaryFormat::Coff {
|
||||||
|
file.add_section(Vec::new(), ".text".into(), object::SectionKind::Text);
|
||||||
|
}
|
||||||
|
|
||||||
for (sym, kind) in symbols.iter() {
|
for (sym, kind) in symbols.iter() {
|
||||||
file.add_symbol(object::write::Symbol {
|
file.add_symbol(object::write::Symbol {
|
||||||
name: sym.clone().into(),
|
name: sym.clone().into(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue