]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
include: libsframe: define new flag SFRAME_F_FDE_FUNC_START_ADDR_PCREL
authorIndu Bhagat <indu.bhagat@oracle.com>
Thu, 24 Apr 2025 21:59:56 +0000 (14:59 -0700)
committerIndu Bhagat <indu.bhagat@oracle.com>
Wed, 28 May 2025 04:58:14 +0000 (21:58 -0700)
commit4880e6281f0c83df6108316f3e066d6efd1aaebe
tree0fb6db284e46df56c72700c3810f5233b8e01753
parent2a3e59e4297234c1b5967d934db85eaa7afc87a8
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.
include/sframe.h
libsframe/sframe-dump.c
libsframe/sframe.c