Re: [PATCH v4 05/39] x86/asm: Avoid emitting DWARF CFI for non-VDSO

Josh Poimboeuf <[email protected]>
Newsgroups org.kernel.vger.linux-toolchains,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-trace-kernel
Message-ID <20250124164752.hmwq6mctc6nf7uni@jpoimboe>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.