]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
include: gas: bfd: sframe: clean the abstraction
authorIndu Bhagat <indu.bhagat@oracle.com>
Wed, 22 Oct 2025 23:29:38 +0000 (16:29 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Tue, 9 Dec 2025 08:26:11 +0000 (00:26 -0800)
... between specification and implmentation.

Move to definition in the implementation (gas/ld/libsframe) and not the
specification (include/sframe.h).  At this time the implementation in
gas and ld generate the sections in the latest SFrame version only.

bfd/
        * elf-sframe.c: Add definition here.
gas/
        * gen-sframe.c: Likewise.
libsframe/
        * sframe.c: Likewise.
include/
        * sframe.h: Remove the definition.

bfd/elf-sframe.c
gas/gen-sframe.c
include/sframe.h
libsframe/sframe.c

index 8e4cfdd73d3df69a980a32eff2df7043ab7124aa..37ad0b5b6e8a51c2f1619e69d645c5265d138811 100644 (file)
@@ -25,6 +25,8 @@
 #include "sframe-api.h"
 #include "sframe-internal.h"
 
+typedef sframe_func_desc_entry_v2 sframe_func_desc_entry;
+
 /* Return TRUE if the function has been marked for deletion during the linking
    process.  */
 
index f39b4f495b4d69533e4a201489fb8a023942284d..a845c20a54e289f0e27fb0f216e173270b4862f4 100644 (file)
@@ -54,6 +54,9 @@
 # define SFRAME_FRE_TYPE_SELECTION_OPT 1
 #endif
 
+/* gas emits SFrame Version 2 only at this time.  */
+typedef sframe_func_desc_entry_v2 sframe_func_desc_entry;
+
 /* List of SFrame FDE entries.  */
 
 static struct sframe_func_entry *all_sframe_fdes = NULL;
index 44000413dce62567c54f53ee04ac9a82cd6390a7..d2a3c8390bf87da3da90be561ea9e49f0fec8585 100644 (file)
@@ -212,8 +212,6 @@ typedef struct sframe_func_desc_entry_v2
   uint16_t sfde_func_padding2;
 } ATTRIBUTE_PACKED sframe_func_desc_entry_v2;
 
-typedef sframe_func_desc_entry_v2 sframe_func_desc_entry;
-
 /* Macros to compose and decompose function info in FDE.  */
 
 /* Note: Set PAC auth key to SFRAME_AARCH64_PAUTH_KEY_A by default.  */
index 0dcc782b1f6c76a842208b8afc398f64aecb615f..66810f93f353c05c939ead8a309e3795b011c386 100644 (file)
@@ -26,6 +26,8 @@
 #include "sframe-impl.h"
 #include "swap.h"
 
+typedef sframe_func_desc_entry_v2 sframe_func_desc_entry;
+
 struct sf_fde_tbl
 {
   unsigned int count;