Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: Alexander Kanavin <alex.kanavin@gmail.com>
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: Tue, 04 Feb 2025 13:36:54 +0100	[thread overview]
Message-ID: <87y0ylga3d.fsf@gnu.org> (raw)
In-Reply-To: <CANNYZj-O24h9m9gG-yHpDX4s9OxrJrfkfKDuETcXFq8X_r99ow@mail.gmail.com> (Alexander Kanavin's message of "Tue, 4 Feb 2025 12:37:15 +0100")


Hello Alexander,

> I don't understand. We already have support and tests for
> minidebuginfo, so what additional functionality would the above
> setting enable? Can you adjust the existing tests to showcase that?

When you want to display a backtrace on target you need basically two
things:

1. Symbols
2. Unwind information

The minidebuginfo functionality is covering the first part. It is
providing some symbols in a compressed way, that get appended to every
binary/library at build time.

Then the second part is about how to unwind the stack. That is
architecture dependant. On ARMv7, GCC is producing unwind information in
the .debug_frame section. That section is always removed by
'strip'. It prevents any unwinding based on .debug_frame on the target.

In the first version of that patch[1], I was proposing to introduce a
variable called PACKAGE_KEEP_DEBUG_FRAME to instruct `strip` to keep the
.debug_frame section around.

Quentin, pointed out, that we could be more generic and offer a
PACKAGE_KEEP_SECTIONS variable instead, to prevent specific sections
from being stripped.

That's what is done in this v2. I have proposed a documentation update
here: https://lists.yoctoproject.org/g/docs/message/6243

> Also the patch is changing things all over the place, and so is
> difficult to review. Can you split it up? E.g. first add some new
> thing, then adjust code elsewhere to take it into use.

It is only modifying the run_strip function and its callers, so "all over
the place" seems like an overstatement. I am not really sure how to
break that into more pieces. It's just about instructing "strip" to keep
some sections that are specified in the PACKAGE_KEEP_SECTIONS variable.

I would be glad to bring some more details on the topic if needed.

Thanks,

Mathieu


  parent reply	other threads:[~2025-02-04 12:36 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 [this message]
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
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=87y0ylga3d.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quentin.schulz@cherry.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox