aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-04-13 10:58:40 +0930
committerAlan Modra <amodra@gmail.com>2017-04-13 17:07:24 +0930
commitc08bb8dd9bd9fd101018b287726187d7ed6a0035 (patch)
tree09a33dcea9c5a05a81a944fea362ef434d93d9b8 /bfd/coff-arm.c
parent10463f39c79843c2c141481a0781091870695b17 (diff)
downloadgdb-c08bb8dd9bd9fd101018b287726187d7ed6a0035.zip
gdb-c08bb8dd9bd9fd101018b287726187d7ed6a0035.tar.gz
gdb-c08bb8dd9bd9fd101018b287726187d7ed6a0035.tar.bz2
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.
Diffstat (limited to 'bfd/coff-arm.c')
-rw-r--r--bfd/coff-arm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 3c892ef..b66ebe4 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1362,7 +1362,7 @@ coff_arm_relocate_section (bfd *output_bfd,
/* xgettext:c-format */
(_("%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: arm call to thumb"),
- h_sec->owner, input_bfd, name);
+ h_sec->owner, name, input_bfd);
--my_offset;
myh->root.u.def.value = my_offset;
@@ -1453,7 +1453,7 @@ coff_arm_relocate_section (bfd *output_bfd,
(_("%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: thumb call to arm\n"
" consider relinking with --support-old-code enabled"),
- h_sec->owner, input_bfd, name);
+ h_sec->owner, name, input_bfd);
-- my_offset;
myh->root.u.def.value = my_offset;
@@ -1744,7 +1744,7 @@ coff_arm_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:
{
@@ -2201,9 +2201,8 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info)
_bfd_error_handler
/* xgettext: c-format */
(_("error: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"),
- ibfd, obfd,
- APCS_26_FLAG (ibfd) ? 26 : 32,
- APCS_26_FLAG (obfd) ? 26 : 32
+ ibfd, APCS_26_FLAG (ibfd) ? 26 : 32,
+ obfd, APCS_26_FLAG (obfd) ? 26 : 32
);
bfd_set_error (bfd_error_wrong_format);