Synthesized CFI for hand-written assembly in GNU assembler
summary
GNU assembler gains a new SCFI mode that tries to synthesize full DWARF call‑frame info for hand‑written assembly via --scfi=all, currently tested on x86_64 with patches that work on a limited set of inputs. It requires explicit function bounds (.type/.size or .size), rejects indirect branches/jump tables (warns “untraceable control flow”), cannot synthesize signal‑frame/section/label directives, and demands the CFA be SP or FP based; roadmap adds --scfi=inline and aarch64.
AI-written summary · about
chapters (15)
- 0:00Introduction to SCFI
- 3:15SCFI permissibility criteria
- 7:13Function marking requirements
- 8:36Control flow graph constraints
- 10:46ABI conformance limitations
- 13:53CFA register restrictions
- 16:42Kernel use case feedback
- 23:29Advantages over object file analysis
- 26:01Toolchain upgrade concerns
- 30:13Manual annotations necessity
- 33:04Per-function opt-in proposal
- 38:21Assembler validation feature
- 41:12Dynamic CFI generation discussion
- 43:20Kernel perspective on inline assembly
- 47:17Alternatives and patching challenges
related talks
46mWhat C and C++ can do and when do you need Assembly?
40mCompact C Type Format in the GNU Toolchain
34mGo Inline Assembler: Dream or Reality
43mToolchains for the Future
31mToolchains for People in a Hurry: Latest Features of GCC/GLIBC
54mGNU CGEN for RISC V Tool Chain Customization
26mAn MLIR Dialect for WebAssembly
01h 00mJust Enough Assembly for Compiler Explorer
