All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org,
	 Quentin Schulz <quentin.schulz@cherry.de>
Subject: Re: [OE-core] [PATCH v2] lib/oe/package: Add strip keep-section support
Date: Sat, 01 Mar 2025 10:31:50 +0100	[thread overview]
Message-ID: <87ikotnlkp.fsf@gnu.org> (raw)
In-Reply-To: <0b50a9ac2a5678fd35e2ecd0be842847223a0096.camel@linuxfoundation.org> (Richard Purdie's message of "Fri, 28 Feb 2025 10:37:35 +0000")


Hello Richard,

> You're using this with minidebuginfo so does it not make sense to add
> this as one of the debug sections injected there with the rest of the
> minidebug info?

Well minidebuginfo is about having compressed symbols in an ELF section,
and keeping .debug_frame is about having unwinding material in another
ELF section. In the end both of them are needed to get human-readable
backtraces on target.

Now, keeping .debug_frame when minidebuginfo is enabled seems a bit
odd. We could only keep .debug_frame on the needed architectures (ARMv7)
and rely on the more generic .eh_frame sections that are never stripped
on other architectures (aarch64, x86_64). Yet, picking what to strip
based on whether minidebuginfo is enabled does not feel right.

Maybe, we could go for a DISTRO_FEATURE that would be even more generic,
such as "backtrace_on_target" that would enable minidebuginfo and keep
the suitable unwinding sections based on the architecture. That way,
users would have unwinding materials and symbols so that GDB, libunwind,
systemd-coredump and other backtracing tools always work on target with
a minimal overhead. People could enable "backtrace_on_target", see if
the image overhead is acceptable to them, and have backtraces without
diving into complex details.

I think it would still be needed to offer minidebuginfo and
PACKAGE_KEEP_SECTIONS so that users willing to invest more time can
decide precisely what do they want on the target in terms of symbols and
unwinding material.

What would you think about that?

Thanks,

Mathieu


  reply	other threads:[~2025-03-01  9:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 10:37 [PATCH v2] lib/oe/package: Add strip keep-section support Mathieu Othacehe
2025-02-04 11:37 ` [OE-core] " Alexander Kanavin
2025-02-04 11:39   ` Alexander Kanavin
2025-02-04 12:36   ` Mathieu Othacehe
2025-02-04 12:50     ` Alexander Kanavin
2025-02-04 14:25       ` Mathieu Othacehe
2025-02-04 19:02         ` Alexander Kanavin
2025-02-27 15:28 ` Richard Purdie
2025-02-28  9:09   ` Mathieu Othacehe
2025-02-28 10:37     ` Richard Purdie
2025-03-01  9:31       ` Mathieu Othacehe [this message]
2025-03-01  9:57         ` Richard Purdie
2025-03-06  7:34           ` Mathieu Othacehe
2025-03-01 16:11         ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikotnlkp.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quentin.schulz@cherry.de \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.