]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
elf_backend_finish_dynamic_symbol returning false
authorAlan Modra <amodra@gmail.com>
Wed, 14 Feb 2024 04:04:47 +0000 (14:34 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 15 Feb 2024 00:54:13 +0000 (11:24 +1030)
commitcf95b909e2c29476525da29bfb4f0d2c8211e8b6
treec437c362eb3e94776db9f3dfd40e8d679c5a153b
parent122d82284483577a388541f7fe2739754d4699b6
elf_backend_finish_dynamic_symbol returning false

Returning false from elf_backend_finish_dynamic_symbol will not result
in an error being printed unless bfd_error is set but will result in
the linker exiting with a non-zero status.  If just bfd_error is set
then a generic "final link failed" will result, which doesn't help a
user much.  So elf_backend_finish_dynamic_symbol should print its own
error message whenever returning false, or use BFD_ASSERT or abort to
print assertion failures for conditions that shouldn't occur.

This patch does that, and removes unnecessary "htab != NULL" tests in
elf_backend_finish_dynamic_symbol.  Such tests aren't needed in a
function only called via elf_backend_data.
24 files changed:
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-cris.c
bfd/elf32-csky.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32r.c
bfd/elf32-microblaze.c
bfd/elf32-or1k.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-x86-64.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfnn-kvx.c
bfd/elfnn-riscv.c
bfd/elfxx-mips.c