aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ia64-vms.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/elf64-ia64-vms.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/elf64-ia64-vms.c')
-rw-r--r--bfd/elf64-ia64-vms.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index 3e316d3..7c4dfb3 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -584,8 +584,9 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect branch."),
- sec->owner, sec, (unsigned long) roff);
+ (_("%B: Can't relax br at 0x%lx in section `%A'."
+ " Please use brl or indirect branch."),
+ sec->owner, (unsigned long) roff, sec);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -3947,9 +3948,10 @@ elf64_ia64_relocate_section (bfd *output_bfd,
case R_IA64_LTOFF_DTPREL22:
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: missing TLS section for relocation %s against `%s' at 0x%lx in section `%A'."),
- input_bfd, input_section, howto->name, name,
- rel->r_offset);
+ (_("%B: missing TLS section for relocation %s against `%s'"
+ " at 0x%lx in section `%A'."),
+ input_bfd, howto->name, name,
+ rel->r_offset, input_section);
break;
case R_IA64_PCREL21B:
@@ -3963,9 +3965,10 @@ elf64_ia64_relocate_section (bfd *output_bfd,
that the section is too big to relax. */
_bfd_error_handler
/* xgettext:c-format */
- (_("%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> 0x1000000)."),
- input_bfd, input_section, howto->name, name,
- rel->r_offset, input_section->size);
+ (_("%B: Can't relax br (%s) to `%s' at 0x%lx in section"
+ " `%A' with size 0x%lx (> 0x1000000)."),
+ input_bfd, howto->name, name, rel->r_offset,
+ input_section, input_section->size);
break;
}
/* Fall through. */
@@ -5135,15 +5138,15 @@ error_free_dyn:
/* xgettext:c-format */
(_("Warning: alignment %u of common symbol `%s' in %B"
" is greater than the alignment (%u) of its section %A"),
- common_bfd, h->root.u.def.section,
- 1 << common_align, name, 1 << normal_align);
+ 1 << common_align, name, common_bfd,
+ 1 << normal_align, h->root.u.def.section);
else
_bfd_error_handler
/* xgettext:c-format */
(_("Warning: alignment %u of symbol `%s' in %B"
" is smaller than %u in %B"),
- normal_bfd, common_bfd,
- 1 << normal_align, name, 1 << common_align);
+ 1 << normal_align, name, normal_bfd,
+ 1 << common_align, common_bfd);
}
}
@@ -5158,9 +5161,8 @@ error_free_dyn:
/* xgettext:c-format */
(_("Warning: size of symbol `%s' changed"
" from %lu in %B to %lu in %B"),
- old_bfd, abfd,
- name, (unsigned long) h->size,
- (unsigned long) isym->st_size);
+ name, (unsigned long) h->size, old_bfd,
+ (unsigned long) isym->st_size, abfd);
h->size = isym->st_size;
}
@@ -5186,7 +5188,7 @@ error_free_dyn:
/* xgettext:c-format */
(_("Warning: type of symbol `%s' changed"
" from %d to %d in %B"),
- abfd, name, h->type, type);
+ name, h->type, type, abfd);
h->type = type;
}