From 52d45da3f275b5d1c8ef2e96a7760585c736133b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 30 Sep 2016 11:03:52 +0930 Subject: Make bfd_error_handler_type like vprintf It was like printf, which means you can't use bfd_set_error_handler to hook in a function to do something and then call the original handler. The patch also deletes some unused functions and makes pointers local. bfd/ * bfd-in.h: Include stdarg.h. * bfd.c (bfd_error_handler_type): Make like vprintf. (_bfd_error_internal): Rename from _bfd_error_handler. Make static. (error_handler_internal): New function, split out from.. (_bfd_default_error_handler): ..here. Rename to _bfd_error_handler. (bfd_set_error_handler): Update. (bfd_get_error_handler, bfd_get_assert_handler): Delete. (_bfd_assert_handler): Make static. * coffgen.c (null_error_handler): Update params. * elf-bfd.h (struct elf_backend_data ): Don't use bfd_error_handler_type. * elf64-mmix.c (mmix_dump_bpo_gregs): Likewise. * elfxx-target.h (elf_backend_link_order_error_handler): Default to _bfd_error_handler. * libbfd-in.h (_bfd_default_error_handler): Don't declare. (bfd_assert_handler_type): Likewise. (_bfd_error_handler): Update. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. ld/ * ldlang.c (ignore_bfd_errors): Update params. --- bfd/libbfd-in.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bfd/libbfd-in.h') diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index cde3aad..f27adc9 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -109,9 +109,7 @@ extern void *bfd_realloc2 extern void *bfd_zmalloc2 (bfd_size_type, bfd_size_type); -extern void _bfd_default_error_handler (const char *s, ...); -extern bfd_error_handler_type _bfd_error_handler; -extern bfd_assert_handler_type _bfd_assert_handler; +extern void _bfd_error_handler (const char *s, ...); /* These routines allocate and free things on the BFD's objalloc. */ -- cgit v1.1