From: Indu Bhagat Date: Wed, 22 Oct 2025 23:29:38 +0000 (-0700) Subject: include: gas: bfd: sframe: clean the abstraction X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1b5a96688536eed220d48165e71eb0c077ed51d;p=thirdparty%2Fbinutils-gdb.git 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. bfd/ * elf-sframe.c: Add definition here. gas/ * gen-sframe.c: Likewise. libsframe/ * sframe.c: Likewise. include/ * sframe.h: Remove the definition. --- diff --git a/bfd/elf-sframe.c b/bfd/elf-sframe.c index 8e4cfdd73d3..37ad0b5b6e8 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 f39b4f495b4..a845c20a54e 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 0dcc782b1f6..66810f93f35 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;