1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

sframe: Add support for SFRAME_F_FDE_FUNC_START_PCREL flag

The Sframe V2 has a new errata which introduces the
SFRAME_F_FDE_FUNC_START_PCREL flag. This flag indicates the encoding
of the SFrame FDE function start address field like this:

- if set, sfde_func_start_address field contains the offset in bytes
to the start PC of the associated function from the field itself.

- if unset, sfde_func_start_address field contains the offset in bytes
to the start PC of the associated function from the start of the
SFrame section.

Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
Claudiu Zissulescu
2025-07-22 12:55:51 -03:00
committed by Adhemerval Zanella
parent 20528165bd
commit 072b5a9922
3 changed files with 118 additions and 31 deletions

View File

@@ -80,9 +80,20 @@ extern "C"
/* Various flags for SFrame. */
/* Function Descriptor Entries are sorted on PC. */
#define SFRAME_F_FDE_SORTED 0x1
#define SFRAME_F_FDE_SORTED 0x1
/* Functions preserve frame pointer. */
#define SFRAME_F_FRAME_POINTER 0x2
#define SFRAME_F_FRAME_POINTER 0x2
/* Function start address in SFrame FDE is encoded as the distance from the
location of the sfde_func_start_address to the start PC of the function.
If absent, the function start address in SFrame FDE is encoded as the
distance from the start of the SFrame FDE section to the start PC of the
function. */
#define SFRAME_F_FDE_FUNC_START_PCREL 0x4
/* Set of all defined flags in SFrame V2. */
#define SFRAME_V2_F_ALL_FLAGS \
(SFRAME_F_FDE_SORTED | SFRAME_F_FRAME_POINTER \
| SFRAME_F_FDE_FUNC_START_PCREL)
#define SFRAME_CFA_FIXED_FP_INVALID 0
#define SFRAME_CFA_FIXED_RA_INVALID 0