Re: [PATCH 1/8] unwind: build kernel with sframe info
Josh Poimboeuf <[email protected]>
| Newsgroups | org.kernel.vger.linux-toolchains,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.live-patching |
|---|---|
| Message-ID | <20250207180157.j25afocbe2kkkbv3@jpoimboe> |
On Tue, Feb 04, 2025 at 04:22:27PM -0800, Indu Bhagat wrote: > > +++ b/arch/Kconfig > > @@ -1736,4 +1736,12 @@ config ARCH_WANTS_PRE_LINK_VMLINUX > > An architecture can select this if it provides arch/<arch>/tools/Makefile > > with .arch.vmlinux.o target to be linked into vmlinux. > > +config AS_HAS_SFRAME_SUPPORT > > + # Detect availability of the AS option -Wa,--gsframe for generating > > + # sframe unwind table. > > + def_bool $(cc-option,-Wa$(comma)--gsframe) > > + > > Since the version of an admissible SFrame section needs to be atleast > SFRAME_VERSION_2, it will make sense to include SFrame version check when > detecting compatible toolchain. Also, Jens pointed out that checking for '-Wa,--gsframe' isn't sufficient, as it still succeeds for architectures that aren't yet supported: https://lore.kernel.org/[email protected] so in my patches I have: config AS_SFRAME def_bool $(as-instr,.cfi_sections .sframe\n.cfi_startproc\n.cfi_endproc) Though I'm not sure how you would add an SFrame version check to that. -- Josh