Re: [PATCH v4 05/39] x86/asm: Avoid emitting DWARF CFI for non-VDSO
From: Josh Poimboeuf
Date: Fri Jan 24 2025 - 11:48:10 EST
On Fri, Jan 24, 2025 at 05:08:57PM +0100, Jens Remus wrote:
> On 22.01.2025 03:30, Josh Poimboeuf wrote:
> > -#ifndef BUILD_VDSO
> > - /*
> > - * Emit CFI data in .debug_frame sections, not .eh_frame sections.
> > - * The latter we currently just discard since we don't do DWARF
> > - * unwinding at runtime. So only the offline DWARF information is
> > - * useful to anyone. Note we should not use this directive if we
> > - * ever decide to enable DWARF unwinding at runtime.
> > - */
> > - .cfi_sections .debug_frame
> > -#else
> > - /*
> > - * For the vDSO, emit both runtime unwind information and debug
> > - * symbols for the .dbg file.
> > - */
> > - .cfi_sections .eh_frame, .debug_frame
> > -#endif
> > +#else /* !BUILD_VDSO */
> > +
>
> Did you remove ".cfi_sections .debug_frame" on purpose from the
> !BUILD_VDSO path compared to V3?
Yes, since non-VDSO assembly files won't be emitting any .cfi, there's
no .debug_frame to output anyway.
> Presumably to not only not emit DWARF CFI from assembler, but any
> source?
This only impacts assembly files, notice the __ASSEMBLY__ check at the
top of the file.
--
Josh