[PATCH, V2 05/14] libsframe: implement an internal-only SFrame FDE representation
Jens Remus
jremus@linux.ibm.com
Tue Dec 16 12:15:38 GMT 2025
More information about the Binutils mailing list
Tue Dec 16 12:15:38 GMT 2025
- Previous message (by thread): [PATCH, V2 05/14] libsframe: implement an internal-only SFrame FDE representation
- Next message (by thread): [PATCH, V2 06/14] include: sframe: add SFRAME_V2_ prefixed macro names for FDE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12/9/2025 9:59 AM, Indu Bhagat via Binutils wrote: > Up until now, libsframe has used the same SFrame FDE representation as > the on-disk representation (sframe_func_desc_entry). The choice made by > the author of the libary, back when it was first contributed, perhaps > sufficed the needs then. But looking forward, we need to be able to > allow reading and dumping out of not just sections with version > SFRAME_VERSION_2 but also future supported versions. > > Note that libsframe did not expose the SFrame FDE representation in any > public APIs; doing so is not recommended. > > For the path forward, create an internal-only SFrame FDE representation > (sframe_func_desc_entry_int). libsframe now keeps all in-memory FDEs of > type sframe_func_desc_entry_int. Doing so means instead of memcpy, we > need to resort to member-by-member mapping. This can be seen in > sframe_fde_tbl_init (read time) and the new function > sframe_encoder_write_fde (write time). > > Other than that, replace out the previous direct interaction with > on-disk format when: > - flipping SFrame contents before decoding them in sframe_decode. > - flipping SFrame contents before writing them out in sframe_encode. > > --- > [No changes in V2] > --- One nit below. Reviewed-by: Jens Remus <jremus@linux.ibm.com> > diff --git a/libsframe/sframe.c b/libsframe/sframe.c > @@ -26,13 +26,22 @@ > #include "sframe-impl.h" > #include "swap.h" > > -typedef sframe_func_desc_entry_v2 sframe_func_desc_entry; > +/* Representation of SFrame FDE internal to libsframe. */ > +typedef struct sframe_func_desc_entry_int > +{ > + int64_t func_start_addr; > + uint32_t func_size; > + uint32_t func_start_fre_off; > + uint32_t func_num_fres; > + uint8_t func_info; > + uint8_t func_rep_size; > +} ATTRIBUTE_PACKED sframe_func_desc_entry_int; Why use ATTRIBUTE_PACKED on the internal representation? It might cause less performant access to the members. Omit that as it is also done for struct sframe_frame_row_entry. Regards, Jens -- Jens Remus Linux on Z Development (D3303) +49-7031-16-1128 Office jremus@de.ibm.com IBM IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294 IBM Data Privacy Statement: https://www.ibm.com/privacy/
- Previous message (by thread): [PATCH, V2 05/14] libsframe: implement an internal-only SFrame FDE representation
- Next message (by thread): [PATCH, V2 06/14] include: sframe: add SFRAME_V2_ prefixed macro names for FDE
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list