mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
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.
This commit is contained in:
@ -2445,9 +2445,8 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
(_("error: %B uses %s instructions but %B uses %s"),
|
||||
ibfd, first_input_bfd,
|
||||
isa_type (in_attr[OFBA_MSPABI_Tag_ISA].i),
|
||||
isa_type (out_attr[OFBA_MSPABI_Tag_ISA].i));
|
||||
ibfd, isa_type (in_attr[OFBA_MSPABI_Tag_ISA].i),
|
||||
first_input_bfd, isa_type (out_attr[OFBA_MSPABI_Tag_ISA].i));
|
||||
result = FALSE;
|
||||
}
|
||||
|
||||
@ -2458,9 +2457,8 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
(_("error: %B uses the %s code model whereas %B uses the %s code model"),
|
||||
ibfd, first_input_bfd,
|
||||
code_model (in_attr[OFBA_MSPABI_Tag_Code_Model].i),
|
||||
code_model (out_attr[OFBA_MSPABI_Tag_Code_Model].i));
|
||||
ibfd, code_model (in_attr[OFBA_MSPABI_Tag_Code_Model].i),
|
||||
first_input_bfd, code_model (out_attr[OFBA_MSPABI_Tag_Code_Model].i));
|
||||
result = FALSE;
|
||||
}
|
||||
|
||||
@ -2482,9 +2480,8 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
(_("error: %B uses the %s data model whereas %B uses the %s data model"),
|
||||
ibfd, first_input_bfd,
|
||||
data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
|
||||
data_model (out_attr[OFBA_MSPABI_Tag_Data_Model].i));
|
||||
ibfd, data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
|
||||
first_input_bfd, data_model (out_attr[OFBA_MSPABI_Tag_Data_Model].i));
|
||||
result = FALSE;
|
||||
}
|
||||
|
||||
@ -2507,8 +2504,8 @@ elf32_msp430_merge_mspabi_attributes (bfd *ibfd, struct bfd_link_info *info)
|
||||
_bfd_error_handler
|
||||
/* xgettext:c-format */
|
||||
(_("error: %B uses the %s data model but %B only uses MSP430 instructions"),
|
||||
ibfd, first_input_bfd,
|
||||
data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i));
|
||||
ibfd, data_model (in_attr[OFBA_MSPABI_Tag_Data_Model].i),
|
||||
first_input_bfd);
|
||||
result = FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user