aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.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/elfxx-mips.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/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 901ddc1..4efa513 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -10132,9 +10132,10 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
sec);
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"),
- input_bfd, input_section, name, howto->name,
- rel->r_offset);
+ (_("%B: Can't find matching LO16 reloc against `%s'"
+ " for %s at 0x%lx in section `%A'"),
+ input_bfd, name,
+ howto->name, rel->r_offset, input_section);
}
}
else
@@ -10679,8 +10680,8 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
"beyond the range of ADDIUPC"),
output_bfd,
htab->root.sgotplt->output_section,
- htab->root.splt->output_section,
- (long) gotpc_offset);
+ (long) gotpc_offset,
+ htab->root.splt->output_section);
bfd_set_error (bfd_error_no_error);
return FALSE;
}
@@ -11246,8 +11247,8 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info)
(_("%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"),
output_bfd,
htab->root.sgotplt->output_section,
- htab->root.splt->output_section,
- (long) gotpc_offset);
+ (long) gotpc_offset,
+ htab->root.splt->output_section);
bfd_set_error (bfd_error_no_error);
return FALSE;
}
@@ -15197,19 +15198,19 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
_bfd_error_handler
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses unknown floating point ABI %d"),
- obfd, abi_fp_bfd, ibfd, out_fp, in_fp);
+ obfd, out_fp, abi_fp_bfd, ibfd, in_fp);
else if (!out_string)
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: %B uses unknown floating point ABI %d "
"(set by %B), %B uses %s"),
- obfd, abi_fp_bfd, ibfd, out_fp, in_string);
+ obfd, out_fp, abi_fp_bfd, ibfd, in_string);
else if (!in_string)
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: %B uses %s (set by %B), "
"%B uses unknown floating point ABI %d"),
- obfd, abi_fp_bfd, ibfd, out_string, in_fp);
+ obfd, out_string, abi_fp_bfd, ibfd, in_fp);
else
{
/* If one of the bfds is soft-float, the other must be
@@ -15222,7 +15223,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: %B uses %s (set by %B), %B uses %s"),
- obfd, abi_fp_bfd, ibfd, out_string, in_string);
+ obfd, out_string, abi_fp_bfd, ibfd, in_string);
}
}
}
@@ -15242,8 +15243,8 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
/* xgettext:c-format */
(_("Warning: %B uses %s (set by %B), "
"%B uses unknown MSA ABI %d"),
- obfd, abi_msa_bfd, ibfd,
- "-mmsa", in_attr[Tag_GNU_MIPS_ABI_MSA].i);
+ obfd, "-mmsa", abi_msa_bfd,
+ ibfd, in_attr[Tag_GNU_MIPS_ABI_MSA].i);
break;
default:
@@ -15254,8 +15255,8 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
/* xgettext:c-format */
(_("Warning: %B uses unknown MSA ABI %d "
"(set by %B), %B uses %s"),
- obfd, abi_msa_bfd, ibfd,
- out_attr[Tag_GNU_MIPS_ABI_MSA].i, "-mmsa");
+ obfd, out_attr[Tag_GNU_MIPS_ABI_MSA].i,
+ abi_msa_bfd, ibfd, "-mmsa");
break;
default:
@@ -15263,9 +15264,8 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info)
/* xgettext:c-format */
(_("Warning: %B uses unknown MSA ABI %d "
"(set by %B), %B uses unknown MSA ABI %d"),
- obfd, abi_msa_bfd, ibfd,
- out_attr[Tag_GNU_MIPS_ABI_MSA].i,
- in_attr[Tag_GNU_MIPS_ABI_MSA].i);
+ obfd, out_attr[Tag_GNU_MIPS_ABI_MSA].i,
+ abi_msa_bfd, ibfd, in_attr[Tag_GNU_MIPS_ABI_MSA].i);
break;
}
}