Toolchain support for objtool in the Linux kernel
summary
Objtool reverse engineers object-file CFGs to validate ORC unwinding, SMAP map checks and no-instrument regions, but it mis-parses no-return call sites (compiler-optimized-out fallthroughs) and jump tables (indirect-branch targets), especially off x86 on arm64. Proposal adds compiler-emitted ELF annotations: a non-allocatable f_annotate_no_return section or post-call UD2 trap and an f_annotate_jump_table section to unambiguously mark indirect-branch sites; discussion is active on the toolchain mailing list.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:05What is objtool
- 4:13Why reverse engineer CFG
- 8:14Problem statement
- 10:20Proposed compiler hints
- 13:34Generic solutions discussion
- 17:52Compiler flags and future work
- 19:00Jump table challenges
related talks
44mBoF: Devicetree
48mMy Little Object File: How Linkers Implement C++
35mRethinking Linux tools with Compact Debuginfo Formats
31mAmong ELFs and DWARFs
01h 29mModern Linux C++ Debugging Tools - Under the Covers
45mPerf tools updates and beyond
54mGCC/Clang Optimizations for Embedded Linux
45mSupporting BPF in the GNU Toolchain
