aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-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/elf32-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/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index e04caef..e0ae923 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -4092,7 +4092,7 @@ arm_type_of_stub (struct bfd_link_info *info,
_bfd_error_handler
(_("%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: Thumb call to ARM"),
- sym_sec->owner, input_bfd, name);
+ sym_sec->owner, name, input_bfd);
}
stub_type =
@@ -8810,7 +8810,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
_bfd_error_handler
(_("%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: Thumb call to ARM"),
- sym_sec->owner, input_bfd, name);
+ sym_sec->owner, name, input_bfd);
return FALSE;
}
@@ -8900,7 +8900,7 @@ elf32_arm_create_thumb_stub (struct bfd_link_info * info,
_bfd_error_handler
(_("%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: arm call to thumb"),
- sym_sec->owner, input_bfd, name);
+ sym_sec->owner, name, input_bfd);
}
--my_offset;
@@ -19697,9 +19697,8 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
_bfd_error_handler
(_("error: Source object %B has EABI version %d, but target %B has EABI version %d"),
- ibfd, obfd,
- (in_flags & EF_ARM_EABIMASK) >> 24,
- (out_flags & EF_ARM_EABIMASK) >> 24);
+ ibfd, (in_flags & EF_ARM_EABIMASK) >> 24,
+ obfd, (out_flags & EF_ARM_EABIMASK) >> 24);
return FALSE;
}
@@ -19713,9 +19712,8 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
_bfd_error_handler
(_("error: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"),
- ibfd, obfd,
- in_flags & EF_ARM_APCS_26 ? 26 : 32,
- out_flags & EF_ARM_APCS_26 ? 26 : 32);
+ ibfd, in_flags & EF_ARM_APCS_26 ? 26 : 32,
+ obfd, out_flags & EF_ARM_APCS_26 ? 26 : 32);
flags_compatible = FALSE;
}