diff options
author | Alan Modra <amodra@gmail.com> | 2021-08-07 14:13:11 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-08-07 14:56:53 +0930 |
commit | 983cdaecc134a5f9adefd052a97bc72321bf0ca3 (patch) | |
tree | eedafc8128f1c26d1a0dc623f7c7a58eb5342396 /gdb/source-cache.h | |
parent | 0175375faa416282d2587ca8bf599867dca5fc9e (diff) | |
download | gdb-983cdaecc134a5f9adefd052a97bc72321bf0ca3.zip gdb-983cdaecc134a5f9adefd052a97bc72321bf0ca3.tar.gz gdb-983cdaecc134a5f9adefd052a97bc72321bf0ca3.tar.bz2 |
PR28176, rl78 complex reloc divide by zero
This is a bit more than just preventing the divide by zero. Most of
the patch is tidying up error reporting, so that for example, linking
an object file with a reloc stack underflow produces a linker error
rather than just displaying a message that might be ignored.
PR 28176
* elf32-rl78.c (RL78_STACK_PUSH, RL78_STACK_POP): Delete.
(rl78_stack_push, rl78_stack_pop): New inline functions.
(rl78_compute_complex_reloc): Add status and error message params.
Use new inline stack handling functions. Report stack overflow
or underflow, and divide by zero.
(rl78_special_reloc): Return status and error message from
rl78_compute_complex_reloc.
(rl78_elf_relocate_section): Similarly. Modernise reloc error
reporting. Delete unused bfd_reloc_other case. Don't assume
DIR24S_PCREL overflow is due to undefined function.
(rl78_offset_for_reloc): Adjust to suit rl78_compute_complex_reloc.
Diffstat (limited to 'gdb/source-cache.h')
0 files changed, 0 insertions, 0 deletions