[PATCH, V2 4/9] include: sframe: doc: define new flag SFRAME_F_FDE_FUNC_START_ADDR_PCREL

Jan Beulich jbeulich@suse.com
Fri Jun 6 10:00:33 GMT 2025


On 04.06.2025 09:08, Indu Bhagat via Binutils wrote:
> --- a/libsframe/sframe.c
> +++ b/libsframe/sframe.c
> @@ -205,7 +205,8 @@ flip_fde (sframe_func_desc_entry *fdep)
>  static bool
>  sframe_header_sanity_check_p (sframe_header *hp)
>  {
> -  unsigned char all_flags = SFRAME_F_FDE_SORTED | SFRAME_F_FRAME_POINTER;
> +  uint8_t all_flags = (SFRAME_F_FDE_SORTED | SFRAME_F_FRAME_POINTER
> +		       | SFRAME_F_FDE_FUNC_START_ADDR_PCREL);

Why the switch to uint8_t? From an abstract pov, unsigned char will be
available everywhere. Whether uint8_t exists is in principle uncertain;
none of the uint<N>_t are required to be provided. They may, aiui, in
particular be absent on architectures where (in binutils) we end up with
OCTETS_PER_BYTE != 1 (TI C4x / C54x). IOW using basic types is generally
preferable, wherever possible.

Jan


More information about the Binutils mailing list