public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add PT_GNU_SFRAME segment
@ 2023-01-23 19:56 Indu Bhagat
  2023-01-24 11:13 ` Mark Wielaard
  0 siblings, 1 reply; 6+ messages in thread
From: Indu Bhagat @ 2023-01-23 19:56 UTC (permalink / raw)
  To: gnu-gabi; +Cc: Indu Bhagat

Hello,

As advised by Florian on libc-alpha, here is a patch to add PT_GNU_SFRAME to
the list of p_type values.

As I submit this patch, I am reminded of my ongoing unease with using the
keyword "unwind information" with SFrame format. SFrame format, is the Simple
Frame format, which represents the minimal necessary information for
backtracing:
  - Canonical Frame Address (CFA)
  - Frame Pointer (FP)
  - Return Address (RA)
As such, one can argue that there is a clear distinction between "backtrace"
(=simple call trace) and "unwind"(=stack walk + recover state/regs). 

What do you think will the "correct" terminology here (if there is one) ?
Simple Frame format is for backtracing only, but calling it a "backtrace
format" also sounds off. May be "backtracing format" ? Simple Frame, SFrame,
  backtracing format...

Thoughts?

Thanks
Indu

---
 program-loading-and-dynamic-linking.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/program-loading-and-dynamic-linking.txt b/program-loading-and-dynamic-linking.txt
index a07c195..9148486 100644
--- a/program-loading-and-dynamic-linking.txt
+++ b/program-loading-and-dynamic-linking.txt
@@ -129,6 +129,19 @@ PT_GNU_PROPERTY  0x6474e553
 
   Reference: https://raw.githubusercontent.com/wiki/hjl-tools/linux-abi/linux-abi-draft.pdf
 
+PT_GNU_SFRAME    0x6474e554
+
+  Segment contains the SFrame section (Simple Frame format unwind information).
+
+  NOTE: The virtual address range referred to by PT_GNU_SFRAME must be covered
+  by a PT_LOAD entry - PT_GNU_SFRAME on its own does not trigger the
+  mapping/loading of any data.
+
+  The contents of the SFrame section are described in the binutils
+  documentation.  As of 2.40:
+
+  https://sourceware.org/binutils/docs/sframe-spec.html
+
 There are further extensions to p_type but currently they are all
 architecture specific and should be documented in the relevant ABIs.
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-24 21:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 19:56 [PATCH] Add PT_GNU_SFRAME segment Indu Bhagat
2023-01-24 11:13 ` Mark Wielaard
2023-01-24 13:10   ` Carlos O'Donell
2023-01-24 13:20   ` Florian Weimer
2023-01-24 14:57     ` Carlos O'Donell
2023-01-24 21:52       ` Indu Bhagat

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).