From c08bb8dd9bd9fd101018b287726187d7ed6a0035 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 13 Apr 2017 10:58:40 +0930 Subject: 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. --- bfd/cofflink.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bfd/cofflink.c') diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 41cf77d..033b64e 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -447,8 +447,9 @@ coff_link_add_symbols (bfd *abfd, || BTYPE (sym.n_type) == T_NULL))) _bfd_error_handler /* xgettext: c-format */ - (_("Warning: type of symbol `%s' changed from %d to %d in %B"), - abfd, name, (*sym_hash)->type, sym.n_type); + (_("Warning: type of symbol `%s' changed" + " from %d to %d in %B"), + name, (*sym_hash)->type, sym.n_type, abfd); /* We don't want to change from a meaningful base type to a null one, but if we know @@ -3124,7 +3125,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, _bfd_error_handler /* xgettext: c-format */ (_("%B: bad reloc address 0x%lx in section `%A'"), - input_bfd, input_section, (unsigned long) rel->r_vaddr); + input_bfd, (unsigned long) rel->r_vaddr, input_section); return FALSE; case bfd_reloc_overflow: { -- cgit v1.1