Repository navigation
Fix linking on i686 MSVC when using bare linkers - #242
Conversation
| let mut feature: u64 = 0; | ||
| if architecture == Architecture::I386 { | ||
| feature |= 1; // IMAGE_FILE_SAFE_EXCEPTION_HANDLER | ||
| } | ||
| file.add_symbol(Symbol { | ||
| name: b"@feat.00".to_vec(), | ||
| value: feature, | ||
| size: 0, | ||
| kind: SymbolKind::Data, | ||
| scope: SymbolScope::Compilation, | ||
| weak: false, | ||
| section: SymbolSection::Absolute, | ||
| flags: SymbolFlags::None, | ||
| }); |
There was a problem hiding this comment.
I don't really know much about the implications of some fields, such as the file.add_symbol call and all its arguments. Is this referenced from somewhere? It would be nice to have a comment explaining this.
There was a problem hiding this comment.
Indeed the relevant reference is https://github.com/rust-lang/rust/blob/b90dc1e597db0bbc0cab0eccb39747b1a9d7e607/compiler/rustc_codegen_ssa/src/back/metadata.rs#L224-L252
I'll add a link in a comment.
|
I'm happy to make more changes but also feel free to push any further tweaks to the commentary directly. |
|
Thanks! I'll take another look later today and hopefully publish a release with the fix by tomorrow. |
I encountered the following failure downstream here when building for
i686-pc-windows-msvcI then used an LLM to debug this as I frankly don't know anything about symbol mangling on 32-bit Windows. The diagnosis seems plausible however, and this resolved the build failure.
Edit:
The specific error above was resolved by #245
This now fixes
from https://github.com/rust-secure-code/cargo-auditable/actions/runs/22680924943/job/65750878044