aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2025-07-06 12:46:33 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2025-07-06 12:53:03 -0700
commit72dac98050ee1a8333ec03c9f60e68e327913ec2 (patch)
tree78ce9d6d9dbb8b546055c1d2b673a3b31bf7e012 /include
parentef5573ced1794dd66aea10fc6678c0c6c149da6a (diff)
downloadbinutils-72dac98050ee1a8333ec03c9f60e68e327913ec2.zip
binutils-72dac98050ee1a8333ec03c9f60e68e327913ec2.tar.gz
binutils-72dac98050ee1a8333ec03c9f60e68e327913ec2.tar.bz2
include: libsframe: add APIs for offsetof FDE func start addr field
These APIs will be later used by the linker to arrange SFrame FDEs in the output SFrame section. include/ * sframe-api.h (sframe_decoder_get_offsetof_fde_start_addr): New declaration. (sframe_encoder_get_offsetof_fde_start_addr): Likewise. libsframe/ * libsframe.ver: List the new APIs. * sframe.c (sframe_decoder_get_offsetof_fde_start_addr): New definition. (sframe_encoder_get_offsetof_fde_start_addr): Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/sframe-api.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/sframe-api.h b/include/sframe-api.h
index e5262ae..3dc18b6 100644
--- a/include/sframe-api.h
+++ b/include/sframe-api.h
@@ -128,6 +128,18 @@ sframe_decoder_get_version (sframe_decoder_ctx *dctx);
extern uint8_t
sframe_decoder_get_flags (sframe_decoder_ctx *dctx);
+/* Get the offset of the sfde_func_start_address field (from the start of the
+ on-disk layout of the SFrame section) of the FDE at FUNC_IDX in the decoder
+ context DCTX.
+
+ If FUNC_IDX is more than the number of SFrame FDEs in the section, sets
+ error code in ERRP, but returns the (hypothetical) offset. This is useful
+ for the linker when arranging input FDEs into the output section to be
+ emitted. */
+uint32_t
+sframe_decoder_get_offsetof_fde_start_addr (sframe_decoder_ctx *dctx,
+ uint32_t func_idx, int *errp);
+
/* Return the number of function descriptor entries in the SFrame decoder
DCTX. */
extern uint32_t
@@ -246,6 +258,18 @@ sframe_encoder_get_version (sframe_encoder_ctx *encoder);
extern uint8_t
sframe_encoder_get_flags (sframe_encoder_ctx *encoder);
+/* Get the offset of the sfde_func_start_address field (from the start of the
+ on-disk layout of the SFrame section) of the FDE at FUNC_IDX in the encoder
+ context ENCODER.
+
+ If FUNC_IDX is more than the number of SFrame FDEs in the section, sets
+ error code in ERRP, but returns the (hypothetical) offset. This is useful
+ for the linker when arranging input FDEs into the output section to be
+ emitted. */
+uint32_t
+sframe_encoder_get_offsetof_fde_start_addr (sframe_encoder_ctx *encoder,
+ uint32_t func_idx, int *errp);
+
/* Return the number of function descriptor entries in the SFrame encoder
ENCODER. */
extern uint32_t