aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2025-04-24 14:59:56 -0700
committerIndu Bhagat <indu.bhagat@oracle.com>2025-06-25 12:56:19 -0700
commit8fabef0d1a7a932f1214c96ef391cb35d220049c (patch)
tree463d311798a43eb95cdfdfc64faad5ffb029b731 /binutils/dwarf.c
parentad4b7df7a9e8a2c7428fcfafada68ca717654005 (diff)
downloadbinutils-8fabef0d1a7a932f1214c96ef391cb35d220049c.zip
binutils-8fabef0d1a7a932f1214c96ef391cb35d220049c.tar.gz
binutils-8fabef0d1a7a932f1214c96ef391cb35d220049c.tar.bz2
include: sframe: doc: 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. Define SFRAME_F_ALL_FLAGS in sframe-api.h to help keep the implementation less error-prone by keeping a set of all defined flags at a central place. Adjust the check in sframe_header_sanity_check_p () to use the SFRAME_F_ALL_FLAGS instead. Add documentation for SFRAME_F_FDE_FUNC_START_ADDR_PCREL. Update the documentation about the encoding of the sfde_func_start_address field. Also, update the section "Changes from Version 1 to Version 2" to include the specification of the new flag SFRAME_F_FDE_FUNC_START_ADDR_PCREL as an errata release to the SFrame Version 2 specification. include/ * sframe-api.h (SFRAME_F_ALL_FLAGS): New definition. * sframe.h (SFRAME_F_FDE_FUNC_START_ADDR_PCREL): Likewise. libsframe/ * sframe-dump.c (dump_sframe_header_flags): Update to include the new flag. * sframe.c (sframe_header_sanity_check_p): Use uint8_t. libsframe/doc/ * sframe-spec.texi: Add details about the new flag. Also update the defails about the sfde_func_start_address encoding. --- [Changes in V4] - Define new SFRAME_F_ALL_FLAGS in sframe-api.h. Use it in sframe_header_sanity_check_p (). Mention SFRAME_F_ALL_FLAGS in the commit log. - Add one liner in the SFrame spec "Bits corresponding to the currently undefined flags must be set to zero." [End of changes in V4] [No changes in V3] [Changes in V2] - Switch back to the old style of flag values. - Merge three patches from V1 into a single patch include: libsframe: add APIs for offsetof FDE func start addr field doc: sframe: add documentation for SFRAME_F_FDE_FUNC_START_ADDR_PCREL doc: sframe: update documentation for sfde_func_start_address [End of changes in V2]
Diffstat (limited to 'binutils/dwarf.c')
0 files changed, 0 insertions, 0 deletions