mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
libsframe: rename API sframe_fde_func_info to sframe_fde_create_func_info
The new name better reflects the purpose of the function. ChangeLog: * bfd/elfxx-x86.c (_bfd_x86_elf_create_sframe_plt): Use new name. * libsframe/sframe.c (sframe_fde_create_func_info): Rename sframe_fde_func_info to this. * libsframe/testsuite/libsframe.encode/encode-1.c: Use new name. include/ChangeLog: * sframe-api.h (sframe_fde_create_func_info): Rename sframe_fde_func_info to this.
This commit is contained in:
@ -1857,8 +1857,7 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
|
|||||||
|
|
||||||
/* FRE type is dependent on the size of the function. */
|
/* FRE type is dependent on the size of the function. */
|
||||||
fre_type = sframe_calc_fre_type (dpltsec->size);
|
fre_type = sframe_calc_fre_type (dpltsec->size);
|
||||||
func_info = sframe_fde_func_info (fre_type,
|
func_info = sframe_fde_create_func_info (fre_type, SFRAME_FDE_TYPE_PCINC);
|
||||||
SFRAME_FDE_TYPE_PCINC);
|
|
||||||
|
|
||||||
/* Add SFrame FDE and the associated FREs for plt0 if plt0 has been
|
/* Add SFrame FDE and the associated FREs for plt0 if plt0 has been
|
||||||
generated. */
|
generated. */
|
||||||
@ -1888,7 +1887,8 @@ _bfd_x86_elf_create_sframe_plt (bfd *output_bfd,
|
|||||||
pattern of the instructions in these entries. Using this SFrame FDE
|
pattern of the instructions in these entries. Using this SFrame FDE
|
||||||
type helps in keeping the unwind information for pltn entries
|
type helps in keeping the unwind information for pltn entries
|
||||||
compact. */
|
compact. */
|
||||||
func_info = sframe_fde_func_info (fre_type, SFRAME_FDE_TYPE_PCMASK);
|
func_info = sframe_fde_create_func_info (fre_type,
|
||||||
|
SFRAME_FDE_TYPE_PCMASK);
|
||||||
/* Add the SFrame FDE for all PCs starting at the first pltn entry (hence,
|
/* Add the SFrame FDE for all PCs starting at the first pltn entry (hence,
|
||||||
function start address = plt0_entry_size. As usual, this will be
|
function start address = plt0_entry_size. As usual, this will be
|
||||||
updated later at _bfd_elf_merge_section_sframe, by when the
|
updated later at _bfd_elf_merge_section_sframe, by when the
|
||||||
|
@ -83,10 +83,10 @@ _SFRAME_ERRORS
|
|||||||
extern const char *
|
extern const char *
|
||||||
sframe_errmsg (int error);
|
sframe_errmsg (int error);
|
||||||
|
|
||||||
/* Get FDE function info given a FRE_TYPE. */
|
/* Create an FDE function info bye given an FRE_TYPE and an FDE_TYPE. */
|
||||||
|
|
||||||
extern unsigned char
|
extern unsigned char
|
||||||
sframe_fde_func_info (unsigned int fre_type, unsigned int fde_type);
|
sframe_fde_create_func_info (unsigned int fre_type, unsigned int fde_type);
|
||||||
|
|
||||||
/* Gather the FRE type given the function size. */
|
/* Gather the FRE type given the function size. */
|
||||||
|
|
||||||
|
@ -548,12 +548,12 @@ sframe_decoder_free (sframe_decoder_ctx **decoder)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a FDE function info byte given an FRE_TYPE and an FDE_TYPE. */
|
/* Create an FDE function info byte given an FRE_TYPE and an FDE_TYPE. */
|
||||||
/* FIXME API for linker. Revisit if its better placed somewhere else? */
|
/* FIXME API for linker. Revisit if its better placed somewhere else? */
|
||||||
|
|
||||||
unsigned char
|
unsigned char
|
||||||
sframe_fde_func_info (unsigned int fre_type,
|
sframe_fde_create_func_info (unsigned int fre_type,
|
||||||
unsigned int fde_type)
|
unsigned int fde_type)
|
||||||
{
|
{
|
||||||
unsigned char func_info;
|
unsigned char func_info;
|
||||||
sframe_assert (fre_type == SFRAME_FRE_TYPE_ADDR1
|
sframe_assert (fre_type == SFRAME_FRE_TYPE_ADDR1
|
||||||
|
@ -39,8 +39,8 @@ add_fde1 (sframe_encoder_ctx *encode, int idx)
|
|||||||
{0x1a, 0x5, {0x8, 0xf0, 0}}
|
{0x1a, 0x5, {0x8, 0xf0, 0}}
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned char finfo = sframe_fde_func_info (SFRAME_FRE_TYPE_ADDR1,
|
unsigned char finfo = sframe_fde_create_func_info (SFRAME_FRE_TYPE_ADDR1,
|
||||||
SFRAME_FDE_TYPE_PCINC);
|
SFRAME_FDE_TYPE_PCINC);
|
||||||
err = sframe_encoder_add_funcdesc (encode, 0xfffff03e, 0x1b, finfo, 4);
|
err = sframe_encoder_add_funcdesc (encode, 0xfffff03e, 0x1b, finfo, 4);
|
||||||
if (err == -1)
|
if (err == -1)
|
||||||
return err;
|
return err;
|
||||||
@ -64,8 +64,8 @@ add_fde2 (sframe_encoder_ctx *encode, int idx)
|
|||||||
{0xf, 0x5, {0x8, 0xf0, 0}}
|
{0xf, 0x5, {0x8, 0xf0, 0}}
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned char finfo = sframe_fde_func_info (SFRAME_FRE_TYPE_ADDR1,
|
unsigned char finfo = sframe_fde_create_func_info (SFRAME_FRE_TYPE_ADDR1,
|
||||||
SFRAME_FDE_TYPE_PCINC);
|
SFRAME_FDE_TYPE_PCINC);
|
||||||
err = sframe_encoder_add_funcdesc (encode, 0xfffff059, 0x10, finfo, 4);
|
err = sframe_encoder_add_funcdesc (encode, 0xfffff059, 0x10, finfo, 4);
|
||||||
if (err == -1)
|
if (err == -1)
|
||||||
return err;
|
return err;
|
||||||
|
Reference in New Issue
Block a user