[binutils-gdb] include: gas: bfd: sframe: clean the abstraction
Indu Bhagat
ibhagat@sourceware.org
Tue Dec 23 23:00:24 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f5d28014be01c5fd25115e6e7008499c63f96726
commit f5d28014be01c5fd25115e6e7008499c63f96726
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date: Tue Dec 23 14:59:59 2025 -0800
include: gas: bfd: sframe: clean the abstraction
... 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.
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
bfd/
* elf-sframe.c: Add definition here.
gas/
* gen-sframe.c: Likewise.
libsframe/
* sframe.c: Likewise.
include/
* sframe.h: Remove the definition.
Diff:
---
bfd/elf-sframe.c | 2 ++
gas/gen-sframe.c | 3 +++
include/sframe.h | 2 --
libsframe/sframe.c | 2 ++
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c
index f34d58f3f5a..9357303c70b 100644
--- a/bfd/elf-sframe.c
+++ b/bfd/elf-sframe.c
@@ -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. */
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index 61afd36f105..dad6e8b3735 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -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;
diff --git a/include/sframe.h b/include/sframe.h
index 44000413dce..d2a3c8390bf 100644
--- a/include/sframe.h
+++ b/include/sframe.h
@@ -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. */
diff --git a/libsframe/sframe.c b/libsframe/sframe.c
index 42d00ec412b..fa8835a55f8 100644
--- a/libsframe/sframe.c
+++ b/libsframe/sframe.c
@@ -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;
More information about the Binutils-cvs
mailing list