include: libsframe: define new flag SFRAME_F_FDE_FUNC_START_ADDR_PCREL
Add a new flag SFRAME_F_FDE_FUNC_START_ADDR_PCREL to SFrame stack trace
format. If set, this flag indicates that the function start address
field (sfde_func_start_address) is the offset to the function start
address from the SFrame FDE function start address field itself.
Such an encoding is friendlier to the exisitng PC-REL relocations
available in the ABIs supported in SFrame: AMD64 (R_X86_64_PC32) and
AArch64 (R_AARCH64_PREL32). In subsequent patches, we will make the
implementation in gas and ld to both:
- emit the values in the same (above-mentioned) encoding uniformly.
- set the flag SFRAME_F_FDE_FUNC_START_ADDR_PCREL in the SFrame header
for consumers to be able to distinguish.
include/
* sframe.h (SFRAME_F_FDE_FUNC_START_ADDR_PCREL): New definition.
libsframe/
* sframe-dump.c (MAX_NUM_FLAGS, flags_helper): Update to include
the new flag.
* sframe.c (sframe_header_sanity_check_p): Use uint8_t.