Rewrite bfd error handler
authorAlan Modra <amodra@gmail.com>
Thu, 13 Apr 2017 01:28:40 +0000 (10:58 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 13 Apr 2017 07:37:24 +0000 (17:07 +0930)
commitc08bb8dd9bd9fd101018b287726187d7ed6a0035
tree09a33dcea9c5a05a81a944fea362ef434d93d9b8
parent10463f39c79843c2c141481a0781091870695b17
Rewrite bfd error handler

This steals _doprnt from libiberty, extended to handle %A and %B.
Which lets us do away with the current horrible %A and %B handling
that requires all %A and %B arguments to be passed first, rather than
in the natural order.

* bfd.c (PRINT_TYPE): Define.
(_doprnt): New function.
(error_handler_internal): Use _doprnt.
* coff-arm.c: Put %A and %B arguments to _bfd_error_handler
calls in their natural order, throughout file.
* coff-mcore.c: Likewise.
* coff-ppc.c: Likewise.
* coff-tic80.c: Likewise.
* cofflink.c: Likewise.
* elf-s390-common.c: Likewise.
* elf.c: Likewise.
* elf32-arm.c: Likewise.
* elf32-i386.c: Likewise.
* elf32-m32r.c: Likewise.
* elf32-msp430.c: Likewise.
* elf32-spu.c: Likewise.
* elf64-ia64-vms.c: Likewise.
* elf64-sparc.c: Likewise.
* elf64-x86-64.c: Likewise.
* elflink.c: Likewise.
* elfnn-aarch64.c: Likewise.
* elfnn-ia64.c: Likewise.
* elfxx-mips.c: Likewise.
21 files changed:
bfd/ChangeLog
bfd/bfd.c
bfd/coff-arm.c
bfd/coff-mcore.c
bfd/coff-ppc.c
bfd/coff-tic80.c
bfd/cofflink.c
bfd/elf-s390-common.c
bfd/elf.c
bfd/elf32-arm.c
bfd/elf32-i386.c
bfd/elf32-m32r.c
bfd/elf32-msp430.c
bfd/elf32-spu.c
bfd/elf64-ia64-vms.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfxx-mips.c