public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Reword to reflect SFrame is a stack trace format
@ 2023-01-31 23:34 Indu Bhagat
  2023-01-31 23:34 ` [PATCH 1/5] libsframe/doc: use "stack trace" instead of "unwind" for SFrame Indu Bhagat
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-01-31 23:34 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

Hello,

This patchset amends the code comments and documentation around SFrame format
to correctly use the term "stack trace" instead of "unwind" information.  We
had a brief dicussion on the gnu-gabi list
https://sourceware.org/pipermail/gnu-gabi/2023q1/000521.html.

SFrame format is for generating stack traces only; hence, the keyword "unwind"
is a bulkier and incorrect usage in context of SFrame.  Fixing it.

Thanks,

Indu Bhagat (5):
  libsframe/doc: use "stack trace" instead of "unwind" for SFrame
  sframe: use "stack trace" instead of "unwind" for SFrame
  gas: use "stack trace" instead of "unwind" for SFrame
  bfd: use "stack trace" instead of "unwind" for SFrame
  ld/doc: use "stack trace" instead of "unwind" for SFrame

 bfd/elf-bfd.h                                 |  2 +-
 bfd/elf-sframe.c                              | 11 +++---
 bfd/elf64-x86-64.c                            |  2 +-
 bfd/elfxx-x86.c                               |  8 ++--
 gas/as.c                                      |  2 +-
 gas/config/tc-aarch64.c                       |  4 +-
 gas/config/tc-aarch64.h                       |  8 ++--
 gas/config/tc-i386.c                          |  4 +-
 gas/config/tc-i386.h                          |  6 +--
 gas/gen-sframe.c                              | 28 +++++++-------
 gas/gen-sframe.h                              |  2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-2.s |  2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-3.s |  2 +-
 include/elf/common.h                          |  2 +-
 include/sframe.h                              | 28 +++++++-------
 ld/ld.texi                                    |  2 +-
 libsframe/doc/sframe-spec.texi                | 37 ++++++++++---------
 17 files changed, 77 insertions(+), 73 deletions(-)

-- 
2.39.0


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

* [PATCH 1/5] libsframe/doc: use "stack trace" instead of "unwind" for SFrame
  2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
@ 2023-01-31 23:34 ` Indu Bhagat
  2023-01-31 23:34 ` [PATCH 2/5] sframe: " Indu Bhagat
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-01-31 23:34 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

SFrame format is meant for generating stack traces only.

libsframe/
	* doc/sframe-spec.texi: Use "stack trace" instead of "unwind".
---
 libsframe/doc/sframe-spec.texi | 37 +++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/libsframe/doc/sframe-spec.texi b/libsframe/doc/sframe-spec.texi
index 175c622f85d..6987b6fee13 100644
--- a/libsframe/doc/sframe-spec.texi
+++ b/libsframe/doc/sframe-spec.texi
@@ -35,7 +35,7 @@ License''.
 
 This manual describes version 1 of the SFrame file format.  SFrame stands for
 Simple Frame format.  SFrame format keeps track of the minimal necessary
-information needed for stack unwinding:
+information needed for generating stack traces:
 
 @itemize @minus
 @item
@@ -47,7 +47,7 @@ Return Address (RA).
 @end itemize
 
 The reason for existence of the SFrame format is to support fast, online
-backtracing using a simple unwinder.
+generation of stack traces using simple means.
 
 @menu
 * Overview::
@@ -62,7 +62,7 @@ backtracing using a simple unwinder.
 @cindex Overview
 @tindex PT_GNU_SFRAME
 
-The SFrame unwind information is provided in a loaded section, known as the
+The SFrame stack trace information is provided in a loaded section, known as the
 @code{.sframe} section.  When available, the @code{.sframe} section appears in
 a new segment of its own, PT_GNU_SFRAME.
 
@@ -289,7 +289,7 @@ high-level function description for backtracing.
 @item 0x18
 @tab @code{uint32_t sfh_freoff}
 @tab The offset in bytes of the SFrame FRE sub-section, the core of the SFrame
-section, which describes the unwind information using variable-length array
+section, which describes the stack trace information using variable-length array
 elements. @xref{SFrame Frame Row Entries}.
 
 @end multitable
@@ -303,8 +303,9 @@ elements. @xref{SFrame Frame Row Entries}.
 @cindex SFrame ABI/arch identifier
 
 SFrame header identifies the ABI/arch of the target system for which the
-executable and it's unwind information is intended.  There are currently three
-identifiable ABI/arch values in the format.
+executable and hence, the stack trace information contained in the SFrame
+section, is intended.  There are currently three identifiable ABI/arch values
+in the format.
 
 @multitable {SFRAME_ABI_AARCH64_ENDIAN_LITTLE} {Value} {@code{AARCH64 little-endian}}
 @headitem ABI/arch Identifier @tab Value @tab Description
@@ -324,7 +325,7 @@ identifiable ABI/arch values in the format.
 @end multitable
 
 The presence of an explicit identification of ABI/arch in SFrame may allow
-unwinders to make certain ABI-specific decisions.
+stack trace generators to make certain ABI-specific decisions.
 
 @node SFrame Function Descriptor Entries
 @section SFrame FDE
@@ -332,8 +333,8 @@ unwinders to make certain ABI-specific decisions.
 
 The SFrame Function Descriptor Entry sub-section is a sorted array of
 fixed-length SFrame function descriptor entries (SFrame FDEs).  Each SFrame FDE
-is a packed structure which contains information to describe a function's unwind
-information at a high-level.
+is a packed structure which contains information to describe a function's stack
+trace information at a high-level.
 
 @example
 typedef struct sframe_func_desc_entry
@@ -459,7 +460,7 @@ to look up a matching FRE.
 @subsection The SFrame FRE types
 
 A real world application can have functions of size big and small.  SFrame
-format defines three types of SFrame FRE entries to represent the unwind
+format defines three types of SFrame FRE entries to represent the stack trace
 information for such a variety of function sizes.  These representations vary
 in the number of bits needed to encode the start address offset in the SFrame
 FRE.
@@ -488,21 +489,21 @@ The following constants are defined and used to identify the SFrame FRE types:
 32-bit value.
 @end multitable
 
-A single function must use the same type of FRE throughout.  The choice of
-which SFrame FRE is used to encode the unwind information of a function, is
-stored in the @xref{The SFrame FDE info word}.
+A single function must use the same type of SFrame FRE throughout.  An
+identifier to reflect the chosen SFrame FRE type is stored in the
+@xref{The SFrame FDE info word}.
 
 @node SFrame Frame Row Entries
 @section SFrame FRE
 @cindex SFrame FRE
 
-The SFrame Frame Row Entry sub-section contains the core of the unwind
+The SFrame Frame Row Entry sub-section contains the core of the stack trace
 information.
 
-An SFrame Frame Row Entry is a self-sufficient record containing SFrame unwind
-info for a range of contiguous addresses, starting at the specified offset from
-the start of the function.  Each SFrame Frame Row Entry is followed by S*N
-bytes, where:
+An SFrame Frame Row Entry is a self-sufficient record containing SFrame stack
+trace information for a range of contiguous addresses, starting at the
+specified offset from the start of the function.  Each SFrame Frame Row Entry
+is followed by S*N bytes, where:
 
 @itemize @minus
 @item
-- 
2.39.0


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

* [PATCH 2/5] sframe: use "stack trace" instead of "unwind" for SFrame
  2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
  2023-01-31 23:34 ` [PATCH 1/5] libsframe/doc: use "stack trace" instead of "unwind" for SFrame Indu Bhagat
@ 2023-01-31 23:34 ` Indu Bhagat
  2023-01-31 23:34 ` [PATCH 3/5] gas: " Indu Bhagat
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-01-31 23:34 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

SFrame format is meant for generating stack traces only.

include/
	* sframe.h: Fix comments in the header file.
---
 include/sframe.h | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/sframe.h b/include/sframe.h
index 58ef07dcc21..58907d73413 100644
--- a/include/sframe.h
+++ b/include/sframe.h
@@ -34,8 +34,8 @@ extern "C"
 /* SFrame format.
 
    SFrame format is a simple format to represent the information needed
-   for vanilla virtual stack unwinding.  SFrame format keeps track of the
-   minimal necessary information needed for stack unwinding:
+   for generating vanilla backtraces.  SFrame format keeps track of the
+   minimal necessary information needed for stack tracing:
      - Canonical Frame Address (CFA)
      - Frame Pointer (FP)
      - Return Address (RA)
@@ -59,13 +59,14 @@ extern "C"
    .text.* sections in the resulting binary artifact.  Each Function
    Descriptor Entry specifies the start PC of a function, the size in bytes
    of the function and an offset to its first Frame Row Entry (FRE).  Each FDE
-   additionally also specifies the type of FRE it uses to encode the unwind
-   information.
+   additionally also specifies the type of FRE it uses to encode the stack
+   trace information.
 
-   Next, the Frame Row Entry section is a list of variable size records,
-   each of which represent SFrame unwind information for a set of PCs.  A
-   singular Frame Row Entry is a self-sufficient record with information on
-   how to virtually unwind the stack for the applicable set of PCs.
+   Next, the SFrame Frame Row Entry sub-section is a list of variable size
+   records.  Each entry represents stack trace information for a set of PCs
+   of the function.  A singular Frame Row Entry is a self-sufficient record
+   which contains information on how to generate stack trace from the
+   applicable set of PCs.
 
    */
 
@@ -81,7 +82,7 @@ extern "C"
 
 /* Function Descriptor Entries are sorted on PC.  */
 #define SFRAME_F_FDE_SORTED	0x1
-/* Frame-pointer based unwinding.  */
+/* Functions preserve frame pointer.  */
 #define SFRAME_F_FRAME_POINTER 0x2
 
 #define SFRAME_CFA_FIXED_FP_INVALID 0
@@ -181,8 +182,7 @@ typedef struct sframe_func_desc_entry
   uint32_t sfde_func_start_fre_off;
   /* Number of frame row entries for the function.  */
   uint32_t sfde_func_num_fres;
-  /* Additional information for deciphering the unwind information for the
-     function.
+  /* Additional information for stack tracing from the function:
      - 4-bits: Identify the FRE type used for the function.
      - 1-bit: Identify the FDE type of the function - mask or inc.
      - 1-bit: PAC authorization A/B key (aarch64).
@@ -271,9 +271,9 @@ typedef struct sframe_fre_info
 
    Used for both AMD64 and AARCH64.
 
-   An SFrame Frame Row Entry is a self-sufficient record containing SFrame
-   unwind info for a range of addresses, starting at the specified offset in
-   the function.  Each SFrame Frame Row Entry is followed by S*N bytes, where:
+   An SFrame Frame Row Entry is a self-sufficient record which contains
+   information on how to generate the stack trace for the specified range of
+   PCs.  Each SFrame Frame Row Entry is followed by S*N bytes, where:
      S is the size of the stack frame offset for the FRE, and
      N is the number of stack frame offsets in the FRE
 
-- 
2.39.0


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

* [PATCH 3/5] gas: use "stack trace" instead of "unwind" for SFrame
  2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
  2023-01-31 23:34 ` [PATCH 1/5] libsframe/doc: use "stack trace" instead of "unwind" for SFrame Indu Bhagat
  2023-01-31 23:34 ` [PATCH 2/5] sframe: " Indu Bhagat
@ 2023-01-31 23:34 ` Indu Bhagat
  2023-01-31 23:34 ` [PATCH 4/5] bfd: " Indu Bhagat
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-01-31 23:34 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

SFrame format is meant for generating stack traces only.

gas/
	* as.c: Replace the use of "unwind" with "stack trace".
	* config/tc-aarch64.c: Likewise.
	* config/tc-aarch64.h: Likewise.
	* config/tc-i386.c: Likewise.
	* config/tc-i386.h: Likewise.
	* gen-sframe.c: Likewise.
	* gen-sframe.h: Likewise.
	* testsuite/gas/cfi-sframe/common-empty-2.s: Likewise.
	* testsuite/gas/cfi-sframe/common-empty-3.s: Likewise.
---
 gas/as.c                                      |  2 +-
 gas/config/tc-aarch64.c                       |  4 +--
 gas/config/tc-aarch64.h                       |  8 +++---
 gas/config/tc-i386.c                          |  4 +--
 gas/config/tc-i386.h                          |  6 ++--
 gas/gen-sframe.c                              | 28 ++++++++++---------
 gas/gen-sframe.h                              |  2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-2.s |  2 +-
 gas/testsuite/gas/cfi-sframe/common-empty-3.s |  2 +-
 9 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/gas/as.c b/gas/as.c
index 602ed3b5f79..f548294c3dc 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -317,7 +317,7 @@ Options:\n\
   fprintf (stream, _("\
                           generate GNU Build notes if none are present in the input\n"));
   fprintf (stream, _("\
-  --gsframe               generate SFrame unwind info\n"));
+  --gsframe               generate SFrame stack trace information\n"));
 #endif /* OBJ_ELF */
 
   fprintf (stream, _("\
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 2aeab6f958a..980710e8992 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -76,7 +76,7 @@ enum aarch64_abi_type
 };
 
 unsigned int aarch64_sframe_cfa_sp_reg;
-/* The other CFA base register for SFrame unwind info.  */
+/* The other CFA base register for SFrame stack trace info.  */
 unsigned int aarch64_sframe_cfa_fp_reg;
 unsigned int aarch64_sframe_cfa_ra_reg;
 
@@ -8474,7 +8474,7 @@ aarch64_init_frag (fragS * fragP, int max_chars)
     }
 }
 
-/* Whether SFrame unwind info is supported.  */
+/* Whether SFrame stack trace info is supported.  */
 
 bool
 aarch64_support_sframe_p (void)
diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h
index 134c1f87b4f..f11d04826c3 100644
--- a/gas/config/tc-aarch64.h
+++ b/gas/config/tc-aarch64.h
@@ -263,19 +263,19 @@ extern void aarch64_after_parse_args (void);
 
 #ifdef OBJ_ELF
 
-/* Whether SFrame unwind info is supported.  */
+/* Whether SFrame stack trace info is supported.  */
 extern bool aarch64_support_sframe_p (void);
 #define support_sframe_p aarch64_support_sframe_p
 
-/* The stack-pointer register number for SFrame unwind info.  */
+/* The stack-pointer register number for SFrame stack trace info.  */
 extern unsigned int aarch64_sframe_cfa_sp_reg;
 #define SFRAME_CFA_SP_REG aarch64_sframe_cfa_sp_reg
 
-/* The base-pointer register number for CFA unwind info.  */
+/* The base-pointer register number for CFA stack trace info.  */
 extern unsigned int aarch64_sframe_cfa_fp_reg;
 #define SFRAME_CFA_FP_REG aarch64_sframe_cfa_fp_reg
 
-/* The return address register number for CFA unwind info.  */
+/* The return address register number for CFA stack trace info.  */
 extern unsigned int aarch64_sframe_cfa_ra_reg;
 #define SFRAME_CFA_RA_REG aarch64_sframe_cfa_ra_reg
 
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index e1f8f65f90b..438180cf4e8 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -607,7 +607,7 @@ static int use_big_obj = 0;
 static int shared = 0;
 
 unsigned int x86_sframe_cfa_sp_reg;
-/* The other CFA base register for SFrame unwind info.  */
+/* The other CFA base register for SFrame stack trace info.  */
 unsigned int x86_sframe_cfa_fp_reg;
 unsigned int x86_sframe_cfa_ra_reg;
 
@@ -9285,7 +9285,7 @@ x86_cleanup (void)
 bool
 x86_support_sframe_p (void)
 {
-  /* At this time, SFrame unwind is supported for AMD64 ABI only.  */
+  /* At this time, SFrame stack trace is supported for AMD64 ABI only.  */
   return (x86_elf_abi == X86_64_ABI);
 }
 
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 49d2d25a7a6..9247cdeab8b 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -363,15 +363,15 @@ extern bfd_vma x86_64_section_letter (int, const char **);
 extern void x86_cleanup (void);
 #define md_cleanup() x86_cleanup ()
 
-/* Whether SFrame unwind info is supported.  */
+/* Whether SFrame stack trace info is supported.  */
 extern bool x86_support_sframe_p (void);
 #define support_sframe_p x86_support_sframe_p
 
-/* The stack-pointer register number for SFrame unwind info.  */
+/* The stack-pointer register number for SFrame stack trace info.  */
 extern unsigned int x86_sframe_cfa_sp_reg;
 #define SFRAME_CFA_SP_REG x86_sframe_cfa_sp_reg
 
-/* The frame-pointer register number for CFA unwind info.  */
+/* The frame-pointer register number for SFrame stack trace info.  */
 extern unsigned int x86_sframe_cfa_fp_reg;
 #define SFRAME_CFA_FP_REG x86_sframe_cfa_fp_reg
 
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index d6961f893a6..c5470596d14 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -33,7 +33,7 @@
 
 /* Whether frame row entries track RA.
 
-   A target may not need return address tracking for stack unwinding.  If it
+   A target may not need return address tracking for stack tracing.  If it
    does need the same, SFRAME_CFA_RA_REG must be defined with the return
    address register number.  */
 
@@ -892,7 +892,7 @@ sframe_xlate_ctx_add_fre (struct sframe_xlate_ctx *xlate_ctx,
   xlate_ctx->num_xlate_fres++;
 }
 
-/* A SFrame Frame Row Entry is self-sufficient in terms of unwind information
+/* A SFrame Frame Row Entry is self-sufficient in terms of stack tracing info
    for a given PC.  It contains information assimilated from multiple CFI
    instructions, and hence, a new SFrame FRE is initialized with the data from
    the previous known FRE, if any.
@@ -1024,7 +1024,7 @@ sframe_xlate_do_def_cfa_offset (struct sframe_xlate_ctx *xlate_ctx,
   gas_assert (cur_fre);
   /*  Define the current CFA rule to use the provided offset (but to keep
       the old register).  However, if the old register is not FP/SP,
-      skip creating SFrame unwind info for the function. */
+      skip creating SFrame stack trace info for the function.  */
   if ((cur_fre->cfa_base_reg == SFRAME_CFA_FP_REG)
       || (cur_fre->cfa_base_reg == SFRAME_CFA_SP_REG))
     {
@@ -1081,7 +1081,7 @@ sframe_xlate_do_val_offset (struct sframe_xlate_ctx *xlate_ctx ATTRIBUTE_UNUSED,
   /* Previous value of register is CFA + offset.  However, if the specified
      register is not interesting (FP or RA reg), the current DW_CFA_val_offset
      instruction can be safely skipped without sacrificing the asynchonicity of
-     unwind information.  */
+     stack trace information.  */
   if (cfi_insn->u.r == SFRAME_CFA_FP_REG)
     return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented.  */
 #ifdef SFRAME_FRE_RA_TRACKING
@@ -1103,8 +1103,8 @@ sframe_xlate_do_remember_state (struct sframe_xlate_ctx *xlate_ctx)
   struct sframe_row_entry *last_fre = xlate_ctx->last_fre;
 
   /* If there is no FRE state to remember, nothing to do here.  Return
-     early with non-zero error code, this will cause no SFrame unwind info
-     for the function involved.  */
+     early with non-zero error code, this will cause no SFrame stack trace
+     info for the function involved.  */
   if (!last_fre)
     return SFRAME_XLATE_ERR_INVAL;
 
@@ -1248,7 +1248,7 @@ sframe_do_cfi_insn (struct sframe_xlate_ctx *xlate_ctx,
     default:
       {
 	/* Other CFI opcodes are not processed at this time.
-	   These do not impact the coverage of the basic stack unwinding
+	   These do not impact the coverage of the basic stack tracing
 	   information as conveyed in the SFrame format.
 	    - DW_CFA_register,
 	    - ...
@@ -1285,7 +1285,7 @@ sframe_do_fde (struct sframe_xlate_ctx *xlate_ctx,
       err = sframe_do_cfi_insn (xlate_ctx, cfi_insn);
       if (err != SFRAME_XLATE_OK)
 	{
-	  /* Skip generating SFrame unwind info for the function if any
+	  /* Skip generating SFrame stack trace info for the function if any
 	     offending CFI is encountered by sframe_do_cfi_insn ().  */
 	  return err; /* Return the error code.  */
 	}
@@ -1309,10 +1309,11 @@ sframe_do_fde (struct sframe_xlate_ctx *xlate_ctx,
   return SFRAME_XLATE_OK;
 }
 
-/* Create SFrame unwind info for all functions.
+/* Create SFrame stack trace info for all functions.
 
-   This function consumes the already generated FDEs (by dw2gencfi) and
-   generates unwind data in SFrame format.  */
+   This function consumes the already generated DWARF FDEs (by dw2gencfi) and
+   generates data which is later emitted as stack trace information encoded in
+   the SFrame format.  */
 
 static void
 create_sframe_all (void)
@@ -1330,7 +1331,8 @@ create_sframe_all (void)
 
       /* Process and link SFrame FDEs if no error.  Also skip adding an SFrame
 	 FDE if it does not contain any SFrame FREs.  There is little use of an
-	 SFrame FDE if there is no unwind information about the function.  */
+	 SFrame FDE if there is no stack tracing information for the
+	 function.  */
       int err = sframe_do_fde (xlate_ctx, dw_fde);
       if (err || xlate_ctx->num_xlate_fres == 0)
 	{
@@ -1355,7 +1357,7 @@ output_sframe (segT sframe_seg)
   /* Setup the version specific access functions.  */
   sframe_set_version (SFRAME_VERSION_1);
 
-  /* Process all fdes and create SFrame unwind information.  */
+  /* Process all fdes and create SFrame stack trace information.  */
   create_sframe_all ();
 
   output_sframe_internal ();
diff --git a/gas/gen-sframe.h b/gas/gen-sframe.h
index 77630255e8b..0a0b3658302 100644
--- a/gas/gen-sframe.h
+++ b/gas/gen-sframe.h
@@ -149,7 +149,7 @@ struct sframe_version_ops
   unsigned char (*set_func_info) (unsigned int, unsigned int, unsigned int);
 };
 
-/* Generate SFrame unwind info and prepare contents for the output.
+/* Generate SFrame stack trace info and prepare contents for the output.
    outout_sframe ()  is called at the end of file.  */
 
 extern void output_sframe (segT sframe_seg);
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-2.s b/gas/testsuite/gas/cfi-sframe/common-empty-2.s
index 146c53de785..53bb8c0ce9b 100644
--- a/gas/testsuite/gas/cfi-sframe/common-empty-2.s
+++ b/gas/testsuite/gas/cfi-sframe/common-empty-2.s
@@ -1,5 +1,5 @@
 ## CFA register is not defined to be SP/FP.
-## No SFrame unwind info for this function will be generated.
+## No SFrame stack trace info for this function will be generated.
 	.cfi_startproc simple
 	.long 0
 	.long 0
diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-3.s b/gas/testsuite/gas/cfi-sframe/common-empty-3.s
index 982fe0c851d..cd58499619d 100644
--- a/gas/testsuite/gas/cfi-sframe/common-empty-3.s
+++ b/gas/testsuite/gas/cfi-sframe/common-empty-3.s
@@ -1,5 +1,5 @@
 ## The return column is not the default value.
-## No SFrame unwind info for this function will be generated.
+## No SFrame stack trace info for this function will be generated.
 	.cfi_startproc
 	.cfi_return_column 0
 	.long 0
-- 
2.39.0


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

* [PATCH 4/5] bfd: use "stack trace" instead of "unwind" for SFrame
  2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
                   ` (2 preceding siblings ...)
  2023-01-31 23:34 ` [PATCH 3/5] gas: " Indu Bhagat
@ 2023-01-31 23:34 ` Indu Bhagat
  2023-01-31 23:34 ` [PATCH 5/5] ld/doc: " Indu Bhagat
  2023-02-01  9:42 ` [PATCH 0/5] Reword to reflect SFrame is a stack trace format Nick Clifton
  5 siblings, 0 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-01-31 23:34 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

SFrame format is meant for generating stack traces only.

bfd/
	* elf-bfd.h: Replace the use of "unwind" with "stack trace".
	* elf-sframe.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* elfxx-x86.c: Likewise.

include/
	* elf/common.h: Likewise.
---
 bfd/elf-bfd.h        |  2 +-
 bfd/elf-sframe.c     | 11 ++++++-----
 bfd/elf64-x86-64.c   |  2 +-
 bfd/elfxx-x86.c      |  8 ++++----
 include/elf/common.h |  2 +-
 5 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 2b7c574f540..dff19822547 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -702,7 +702,7 @@ struct elf_link_hash_table
   /* Used by eh_frame code when editing .eh_frame.  */
   struct eh_frame_hdr_info eh_info;
 
-  /* Used to link unwind data in .sframe sections.  */
+  /* Used to link stack trace info in .sframe sections.  */
   struct sframe_enc_info sfe_info;
 
   /* A linked list of local symbols to be added to .dynsym.  */
diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c
index 8a7fd021931..d2954ba9193 100644
--- a/bfd/elf-sframe.c
+++ b/bfd/elf-sframe.c
@@ -206,7 +206,7 @@ _bfd_elf_parse_sframe (bfd *abfd,
       return false;
     }
 
-  /* Read the SFrame unwind information from abfd.  */
+  /* Read the SFrame stack trace information from abfd.  */
   if (!bfd_malloc_and_get_section (abfd, sec, &sfbuf))
     goto fail_no_free;
 
@@ -438,10 +438,11 @@ _bfd_elf_merge_section_sframe (bfd *abfd,
 		}
 	      else
 		{
-		  /* Expected to land here for SFrame unwind info as created
-		     for the .plt* sections.  These sections can have upto two
-		     FDE entries.  Although the code should work for > 2,
-		     leaving this assert here for safety.  */
+		  /* Expected to land here when SFrame stack trace info is
+		     created dynamically for the .plt* sections.  These
+		     sections are expected to have upto two SFrame FDE entries.
+		     Although the code should work for > 2,  leaving this
+		     assert here for safety.  */
 		  BFD_ASSERT (num_fidx <= 2);
 		  /* For the first entry, we know the offset of the SFrame FDE's
 		     sfde_func_start_address.  Side note: see how the value
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 914f82d0151..5f89190a6a0 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -895,7 +895,7 @@ static const struct elf_x86_sframe_plt elf_x86_64_sframe_plt =
   { &elf_x86_64_sframe_pltn_fre1, &elf_x86_64_sframe_pltn_fre2 },
   NON_LAZY_PLT_ENTRY_SIZE,
   1, /* Number of FREs for PLTn for second PLT.  */
-  /* FREs for second plt ( unwind info for .plt.got is
+  /* FREs for second plt (stack trace info for .plt.got is
      identical).  Used when IBT or non-lazy PLT is in effect.  */
   { &elf_x86_64_sframe_sec_pltn_fre1 }
 };
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 42af84b8e04..132fb791ac6 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -1804,7 +1804,7 @@ enum dynobj_sframe_plt_type
   SFRAME_PLT_SEC = 2
 };
 
-/* Create SFrame unwind info for the plt entries in the .plt section
+/* Create SFrame stack trace info for the plt entries in the .plt section
    of type PLT_SEC_TYPE.  */
 
 static bool
@@ -1819,7 +1819,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
   unsigned int plt0_entry_size;
   unsigned char func_info;
   unsigned int fre_type;
-  /* The dynamic plt section for which .sframe unwind information is being
+  /* The dynamic plt section for which .sframe stack trace information is being
      created.  */
   asection *dpltsec;
 
@@ -1832,7 +1832,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
 
   bed = get_elf_backend_data (output_bfd);
   htab = elf_x86_hash_table (info, bed->target_id);
-  /* Whether SFrame unwind info for plt0 is to be generated.  */
+  /* Whether SFrame stack trace info for plt0 is to be generated.  */
   plt0_generated_p = htab->plt.has_plt0;
   plt0_entry_size
     = (plt0_generated_p) ? htab->sframe_plt->plt0_entry_size : 0;
@@ -1906,7 +1906,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
       /* pltn entries use an SFrame FDE of type
 	 SFRAME_FDE_TYPE_PCMASK to exploit the repetitive
 	 pattern of the instructions in these entries.  Using this SFrame FDE
-	 type helps in keeping the unwind information for pltn entries
+	 type helps in keeping the SFrame stack trace info for pltn entries
 	 compact.  */
       func_info	= sframe_fde_create_func_info (fre_type,
 					       SFRAME_FDE_TYPE_PCMASK);
diff --git a/include/elf/common.h b/include/elf/common.h
index bb93123d14a..d19d6f9927d 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -489,7 +489,7 @@
 #define PT_GNU_STACK	(PT_LOOS + 0x474e551) /* Stack flags */
 #define PT_GNU_RELRO	(PT_LOOS + 0x474e552) /* Read-only after relocation */
 #define PT_GNU_PROPERTY	(PT_LOOS + 0x474e553) /* GNU property */
-#define PT_GNU_SFRAME	(PT_LOOS + 0x474e554) /* SFrame unwind information */
+#define PT_GNU_SFRAME	(PT_LOOS + 0x474e554) /* SFrame stack trace information */
 
 /* OpenBSD segment types.  */
 #define PT_OPENBSD_RANDOMIZE (PT_LOOS + 0x5a3dbe6)  /* Fill with random data.  */
-- 
2.39.0


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

* [PATCH 5/5] ld/doc: use "stack trace" instead of "unwind" for SFrame
  2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
                   ` (3 preceding siblings ...)
  2023-01-31 23:34 ` [PATCH 4/5] bfd: " Indu Bhagat
@ 2023-01-31 23:34 ` Indu Bhagat
  2023-02-01  9:42 ` [PATCH 0/5] Reword to reflect SFrame is a stack trace format Nick Clifton
  5 siblings, 0 replies; 7+ messages in thread
From: Indu Bhagat @ 2023-01-31 23:34 UTC (permalink / raw)
  To: binutils; +Cc: Indu Bhagat

SFrame format is meant for generating stack traces only.

ld/
	* ld.texi: Replace the use of "unwind" with "stack trace".
---
 ld/ld.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/ld.texi b/ld/ld.texi
index db3a9f09b45..36005dc2b0d 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -2835,7 +2835,7 @@ section and ELF @code{PT_GNU_EH_FRAME} segment header.
 Request creation of @code{.eh_frame} unwind info for linker
 generated code sections like PLT.  This option is on by default
 if linker generated unwind info is supported.  This option also
-controls the generation of @code{.sframe} unwind info for linker
+controls the generation of @code{.sframe} stack trace info for linker
 generated code sections like PLT.
 
 @kindex --enable-new-dtags
-- 
2.39.0


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

* Re: [PATCH 0/5] Reword to reflect SFrame is a stack trace format
  2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
                   ` (4 preceding siblings ...)
  2023-01-31 23:34 ` [PATCH 5/5] ld/doc: " Indu Bhagat
@ 2023-02-01  9:42 ` Nick Clifton
  5 siblings, 0 replies; 7+ messages in thread
From: Nick Clifton @ 2023-02-01  9:42 UTC (permalink / raw)
  To: Indu Bhagat, binutils

Hi Indu,

> This patchset amends the code comments and documentation around SFrame format
> to correctly use the term "stack trace" instead of "unwind" information.  We
> had a brief dicussion on the gnu-gabi list
> https://sourceware.org/pipermail/gnu-gabi/2023q1/000521.html.

Patch set approved (in its entirety).  Please apply.

Cheers
   Nick



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

end of thread, other threads:[~2023-02-01  9:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31 23:34 [PATCH 0/5] Reword to reflect SFrame is a stack trace format Indu Bhagat
2023-01-31 23:34 ` [PATCH 1/5] libsframe/doc: use "stack trace" instead of "unwind" for SFrame Indu Bhagat
2023-01-31 23:34 ` [PATCH 2/5] sframe: " Indu Bhagat
2023-01-31 23:34 ` [PATCH 3/5] gas: " Indu Bhagat
2023-01-31 23:34 ` [PATCH 4/5] bfd: " Indu Bhagat
2023-01-31 23:34 ` [PATCH 5/5] ld/doc: " Indu Bhagat
2023-02-01  9:42 ` [PATCH 0/5] Reword to reflect SFrame is a stack trace format Nick Clifton

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