Commit 6ae91e0
Fix SIGILL in naked functions with ExternalWeak linkage
Fixes #142880 by replacing the fatal error for ExternalWeak linkage
in naked functions with a fallback to External linkage. This prevents
the SIGILL crash in LLVM while maintaining the intended function
visibility.
The ExternalWeak linkage type was causing LLVM to generate invalid
assembly for naked functions, resulting in SIGILL (illegal instruction)
errors during compilation. This change provides a safe fallback that
preserves the global visibility of the function.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent c2ec753 commit 6ae91e0
File tree
2 files changed
+33
-2
lines changed- compiler/rustc_codegen_ssa/src/mir
- tests/ui/asm
2 files changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments