]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PR11290, avr-ld "out of range error" is confusing
authorAlan Modra <amodra@gmail.com>
Thu, 25 Aug 2022 06:27:02 +0000 (15:57 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 25 Aug 2022 07:50:01 +0000 (17:20 +0930)
commitc2d7de232bb9483af7a0633151edfec4ee52eeda
tree6f82308fd175a2764243a11eaaa80c047c5068f3
parent45692d91e733233d667665750eabdba8ba98b227
PR11290, avr-ld "out of range error" is confusing

Don't overload bfd_reloc_outofrange with what is really a domain error
(target at odd address), or an overflow.

PR 11290
* reloc.c (bfd_reloc_other): Correct comment.
* elf32-avr.c (avr_final_link_relocate): Return bfd_reloc_other
for unaligned reloc target values.  Return bfd_reloc_overflow
when stubs are too far away and when R_AVR_LDS_STS_16,
R_AVR_PORT6, or R_AVR_PORT5 overflow.
(elf32_avr_relocate_section): Report more descriptive relocation
errors.
* bfd-in2.h: Regenerate.
bfd/bfd-in2.h
bfd/elf32-avr.c
bfd/reloc.c