public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Sterling Augustine <saugustine@google.com>
To: Indu Bhagat <indu.bhagat@oracle.com>
Cc: Fangrui Song <maskray@sourceware.org>,
	Binutils <binutils@sourceware.org>,
	 Florian Weimer <fweimer@redhat.com>, Michael Matz <matz@suse.de>,
	Steven Rostedt <rostedt@goodmis.org>,
	 Matthias Klose <doko@debian.org>,
	Pavel Labath <labath@google.com>, Sam James <sam@gentoo.org>,
	 amonakov@ispras.ru
Subject: Re: GNU Tools Cauldron SFrame talk notes
Date: Wed, 15 Oct 2025 13:03:22 -0700	[thread overview]
Message-ID: <CAEG7qUxiJtLOq+LtH4O-_11XB0hFjBO2DatipozkUZRca=Teeg@mail.gmail.com> (raw)
In-Reply-To: <86684688-5ec8-4b0f-bc90-3c4609b45c76@oracle.com>

re: --sframe-index, there are two issues that make it an unacceptable
solution. Both boil down to the fact that debug-info is not a good
model for this problem.

The first is that sframes (and the index itself, in whatever form),
needs to be loadable, and indeed, *loaded* at the point the stack
trace is taken, possibly by the kernel itself. Adding a section like
.gdb_index post-link is simply a matter of objcopy --add-section=....
It doesn't need to be loaded, or have any special handling by anything
other than the debugger. Adding a loadable segment post-link is
substantially more complicated.

The second is that even though gdb_index is easy to add post-link,
users thought it was sufficiently annoying that we added linker
support in three linkers: gnu-ld, gnu-gold, and lld itself. These
additions were completely uncontroversial. That's a pretty big
testament to the value of having the linker do it. It's easy to add a
linker flag, but much harder to add a post-link build step. Especially
with things like build-ids, read-only file systems, and whatever else.
Adding sframes would mean every package in every distro would need to
add a post-link build step, and a distro would have a very hard time
enabling it by default without hundreds of packages updating
themselves.

I have only anecdata here, but I suspect somewhere around 90% of
gdb_index users do it at the link step, rather than post-link.

  reply	other threads:[~2025-10-15 20:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08 23:14 Indu Bhagat
2025-10-09  6:20 ` Fangrui Song
2025-10-10  8:09   ` Indu Bhagat
2025-10-10 14:06     ` Steven Rostedt
2025-10-12 19:25       ` Indu Bhagat
2025-10-10 16:50     ` Fangrui Song
2025-10-12 19:42       ` Indu Bhagat
2025-10-12 20:25         ` Fangrui Song
2025-10-15 19:39           ` Indu Bhagat
2025-10-15 20:03             ` Sterling Augustine [this message]
2025-10-16  8:03             ` Fangrui Song
2025-10-16  8:13               ` Florian Weimer
2025-10-18 17:34                 ` Fangrui Song
2025-10-23 21:40                   ` Indu Bhagat
2025-10-24  7:35                     ` Fangrui Song
2025-11-04 11:41                       ` Florian Weimer
2025-10-20 19:57               ` Indu Bhagat
2025-10-21  6:31                 ` Fangrui Song
2025-10-21 12:15                   ` Jose E. Marchesi
2025-10-22 13:45                   ` Tatsuyuki Ishi
2025-10-23 21:47                   ` Indu Bhagat
2025-10-24  6:19                     ` Fangrui Song
2025-10-24 15:10 ` Tatsuyuki Ishi
2025-10-25 12:46   ` Jose E. Marchesi
2025-10-29  8:33     ` Indu Bhagat
2025-10-29  5:37   ` Indu Bhagat

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='CAEG7qUxiJtLOq+LtH4O-_11XB0hFjBO2DatipozkUZRca=Teeg@mail.gmail.com' \
    --to=saugustine@google.com \
    --cc=amonakov@ispras.ru \
    --cc=binutils@sourceware.org \
    --cc=doko@debian.org \
    --cc=fweimer@redhat.com \
    --cc=indu.bhagat@oracle.com \
    --cc=labath@google.com \
    --cc=maskray@sourceware.org \
    --cc=matz@suse.de \
    --cc=rostedt@goodmis.org \
    --cc=sam@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).