summaryrefslogtreecommitdiff
path: root/bfd/elfnn-ia64.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-03-18 07:31:47 +1030
committerAlan Modra <amodra@gmail.com>2020-03-20 11:02:49 +1030
commita859124df20f6544dbef96084e4e024bccebd853 (patch)
tree2722e09a084496b2acf4a26ae937df56cfbf0086 /bfd/elfnn-ia64.c
parentce2ea1c7e055b3b70f03dc33db3b77b0d775f5de (diff)
downloadbinutils-gdb-a859124df20f6544dbef96084e4e024bccebd853.tar.gz
tidy elf_backend calls
Function pointers in elfNN_bed that are initialized by elfxx-target.h to non-zero values generally don't need a non-NULL test before calling them. Targets don't set a non-NULL function to NULL. The one exception being elfnn-ia64.c and that exception is removed here. * elf.c (_bfd_elf_setup_sections): Don't test known non-NULL backend functions for NULL before calling. (copy_special_section_fields, _bfd_elf_copy_private_bfd_data), (bfd_section_from_shdr, assign_section_numbers): Likewise. * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): Likewise. * elfnn-ia64.c (ignore_errors): New function. (elf_backend_link_order_error_handler): Redefine as ignore_errors.
Diffstat (limited to 'bfd/elfnn-ia64.c')
-rw-r--r--bfd/elfnn-ia64.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 208b85df903..cd94158aba1 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -5015,6 +5015,11 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
break;
}
}
+
+static void
+ignore_errors (const char *fmt ATTRIBUTE_UNUSED, ...)
+{
+}
#define TARGET_LITTLE_SYM ia64_elfNN_le_vec
#define TARGET_LITTLE_NAME "elfNN-ia64-little"
@@ -5112,7 +5117,7 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
We don't want to flood users with so many error messages. We turn
off the warning for now. It will be turned on later when the Intel
compiler is fixed. */
-#define elf_backend_link_order_error_handler NULL
+#define elf_backend_link_order_error_handler ignore_errors
#include "elfNN-target.h"