aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-stopevent.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-10-26 11:28:08 +1030
committerAlan Modra <amodra@gmail.com>2022-10-26 15:36:14 +1030
commitb8d97d38574639d539aa4dfecc2fb5b532c32c5d (patch)
tree9e7b8479136d01032fcb4a72af2482b279b204f9 /gdb/python/py-stopevent.c
parent2f6ba62ed3825afa0d995e23d5bfe2fd8258bd00 (diff)
downloadbinutils-b8d97d38574639d539aa4dfecc2fb5b532c32c5d.zip
binutils-b8d97d38574639d539aa4dfecc2fb5b532c32c5d.tar.gz
binutils-b8d97d38574639d539aa4dfecc2fb5b532c32c5d.tar.bz2
som.c reloc sanity checking
This patch checks that relocations emitted in som_write_fixups have offsets that are monotonic and within a section. To do that properly using bfd_reloc_offset_in_range it is necessary to set the reloc howto size field, which isn't used otherwise by the som backend. Note that the sizes used are not exactly those in the old sizing switch statement deleted from som_write_fixups, but all relocs handled by the main switch statement there get the same size. Most unhandled relocs get a zero size (exceptions being R_RELOCATION, R_SPACE_REF, R_MILLI_REL, R_BREAKPOINT which all involve writing one word according to my SOM reference). I figure it doesn't matter since any unhandled reloc is converted to 0xff R_RESERVED, and a default of zero is better for a "don't know" reloc. Besides tidying the code, stringizing name from type in SOM_HOWTO fixes R_REPEATED_INIT name. * som.c (SOM_HOWTO): Add SIZE arg, delete NAME. Stringize type to name. (som_hppa_howto_table): Update with sizes. (som_write_fixups): Delete sizing switch statement. Sanity check bfd_reloc address against subsection size.
Diffstat (limited to 'gdb/python/py-stopevent.c')
0 files changed, 0 insertions, 0 deletions