bfd_error_handler bfd_vma and bfd_size_type args
authorAlan Modra <amodra@gmail.com>
Sun, 9 Jul 2017 13:41:32 +0000 (23:11 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 12 Jul 2017 04:33:48 +0000 (14:03 +0930)
This patch uses the new %L _bfd_error_handler support for printing
bfd_vma arguments, and fixes a many other format and/or argument
errors in error messages.

bfd/
* binary.c (binary_set_section_contents): Don't print filepos in
error message.
(coff_write_object_contents): Cast size_t for error message.
(coff_slurp_line_table): Don't use bfd_vma symndx.
(coff_slurp_reloc_table): Remove unneeded cast.
* dwarf2.c (read_section): Cast bfd_int64_t to long long for
error message.
(find_abstract_instance_name): Likewise.
* elf32-arm.c (arm_type_of_stub): Correct error arg order.
(bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
(elf32_arm_check_relocs): Make r_symndx an int.
* elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
format string.
* elf32-metag.c (elf_metag_relocate_section): Delete extra error
message arg.
* elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
error message.
* elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
* elf32-s390.c (elf_s390_check_relocs): Likewise.
* elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
* elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
* elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
* elf64-s390.c (elf_s390_check_relocs): Likewise.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
* elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
* elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
* elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
and use %lu for error message.
* elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
* mmo.c (mmo_scan): Make stab_loc a file_ptr.  Cast expression for
error message.

* elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
in error message.
(elf32_arm_final_link_relocate): Likewise.
* coff-arm.c (bfd_arm_process_before_allocation): Likewise.
* coffcode.h (styp_to_sec_flags): Likewise.
* cofflink.c (_bfd_coff_write_global_sym): Likewise.
* ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
* elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
* elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
(elf32_bfin_merge_private_bfd_data): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
* elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
* elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
(i370_elf_relocate_section): Likewise.
* elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
* elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
* elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
* elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
* elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
* elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
* elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
(_bfd_mips_elf_merge_private_bfd_data): Likewise.
* ieee.c (ieee_write_id, read_id): Likewise.
* mach-o.c (bfd_mach_o_write_contents): Likewise.
(bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
(bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
(bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
* stabs.c (_bfd_link_section_stabs): Likewise.

* coff-arm.c (coff_arm_relocate_section): Use L modifier in error
format.
* coff-mcore.c (coff_mcore_relocate_section): Likewise.
* coff-ppc.c (coff_ppc_relocate_section): Likewise.
* coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
* coff-sh.c (sh_relax_section): Likewise.
(sh_relax_delete_bytes, sh_swap_insns): Likewise.
* coff-tic80.c (coff_tic80_relocate_section): Likewise.
* coffcode.h (coff_slurp_reloc_table): Likewise.
* coffgen.c (_bfd_coff_get_external_symbols): Likewise.
(_bfd_coff_read_string_table): Likewise.
* cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
* compress.c (bfd_get_full_section_contents): Likewise.
* dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
* elf.c (bfd_elf_string_from_elf_section): Likewise.
* elf32-arc.c (arc_special_overflow_checks): Likewise.
* elf32-arm.c (elf32_arm_tls_relax): Likewise.
(elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
(elf32_arm_write_section): Likewise.
* elf32-bfin.c (bfin_relocate_section): Likewise.
(bfinfdpic_relocate_section): Likewise.
* elf32-hppa.c (hppa_build_one_stub): Likewise.
(final_link_relocate, elf32_hppa_relocate_section): Likewise.
* elf32-i386.c (elf_i386_tls_transition): Likewise.
(elf_i386_relocate_section): Likewise.
* elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
* elf32-metag.c (elf_metag_relocate_section): Likewise.
* elf32-nds32.c (unrecognized_reloc_msg): Likewise.
(nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
(nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
(nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
(nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
(nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
(nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
(nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
(nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
* elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
* elf32-rx.c (UNSAFE_FOR_PID): Likewise.
* elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
* elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
* elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
* elf32-sh.c (sh_elf_relax_section): Likewise.
(sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
(sh_elf_relocate_section): Likewise.
* elf32-sh64.c (shmedia_prepare_reloc): Likewise.
* elf32-spu.c (spu_elf_relocate_section): Likewise.
* elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
* elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
* elf32-v850.c (v850_elf_relax_section): Likewise.
* elf32-vax.c (elf_vax_check_relocs): Likewise.
(elf_vax_relocate_section): Likewise.
* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
(extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
(compute_text_actions, compute_ebb_proposed_actions): Likewise.
(do_fix_for_relocatable_link): Likewise.
* elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
(elf64_alpha_relax_with_lituse): Likewise.
* elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
(elf_hppa_final_link_relocate): Likewise.
* elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
(elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
(elf64_vms_link_add_object_symbols): Likewise.
* elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
(mmix_final_link_relocate): Likewise.
* elf64-s390.c (invalid_tls_insn): Likewise.
(elf_s390_relocate_section): Likewise.
* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
* elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
(elf_x86_64_relocate_section): Likewise.
* elfcode.h (elf_slurp_symbol_table): Likewise.
* elfcore.h (elf_core_file_p): Likewise.
* elflink.c (elf_link_read_relocs_from_section): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
(elfNN_aarch64_relocate_section): Likewise.
* elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
(elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
* elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
* elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
(_bfd_mips_elf_relocate_section): Likewise.
(_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
* elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
* ieee.c (ieee_slurp_external_symbols): Likewise.
* ihex.c (ihex_write_object_content): Likewise.
* mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
* merge.c (_bfd_merged_section_offset): Likewise.
* mmo.c (mmo_write_loc_chunk): Likewise.
(mmo_write_object_contents): Likewise.
* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
* stabs.c (_bfd_link_section_stabs): Likewise.
* xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
ld/
* testsuite/ld-arc/nps-1b.err: Update.
* testsuite/ld-x86-64/ilp32-11.d: Update.

77 files changed:
bfd/ChangeLog
bfd/binary.c
bfd/coff-arm.c
bfd/coff-mcore.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff-tic80.c
bfd/coffcode.h
bfd/coffgen.c
bfd/cofflink.c
bfd/compress.c
bfd/dwarf2.c
bfd/ecoff.c
bfd/elf-m10300.c
bfd/elf.c
bfd/elf32-arc.c
bfd/elf32-arm.c
bfd/elf32-bfin.c
bfd/elf32-cris.c
bfd/elf32-frv.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68k.c
bfd/elf32-mcore.c
bfd/elf32-mep.c
bfd/elf32-metag.c
bfd/elf32-mt.c
bfd/elf32-nds32.c
bfd/elf32-nios2.c
bfd/elf32-rx.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-sh64.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-ia64-vms.c
bfd/elf64-mmix.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c
bfd/elfcode.h
bfd/elfcore.h
bfd/elflink.c
bfd/elfnn-aarch64.c
bfd/elfnn-ia64.c
bfd/elfnn-riscv.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c
bfd/ieee.c
bfd/ihex.c
bfd/mach-o.c
bfd/merge.c
bfd/mmo.c
bfd/peXXigen.c
bfd/stabs.c
bfd/xcofflink.c
ld/ChangeLog
ld/testsuite/ld-arc/nps-1b.err
ld/testsuite/ld-x86-64/ilp32-11.d

index bc6cdfa87b3358e745f80ffe4f17711e2942b727..54aa1c7ce402f449a33791cf9f31e0e304a964ce 100644 (file)
@@ -1,3 +1,166 @@
+2017-07-12  Alan Modra  <amodra@gmail.com>
+
+       * binary.c (binary_set_section_contents): Don't print filepos in
+       error message.
+       (coff_write_object_contents): Cast size_t for error message.
+       (coff_slurp_line_table): Don't use bfd_vma symndx.
+       (coff_slurp_reloc_table): Remove unneeded cast.
+       * dwarf2.c (read_section): Cast bfd_int64_t to long long for
+       error message.
+       (find_abstract_instance_name): Likewise.
+       * elf32-arm.c (arm_type_of_stub): Correct error arg order.
+       (bfd_elf32_arm_stm32l4xx_erratum_scan): Don't cast error arg.
+       (elf32_arm_check_relocs): Make r_symndx an int.
+       * elf32-cris.c (cris_elf_check_relocs): Delete extraneous %s in
+       format string.
+       * elf32-metag.c (elf_metag_relocate_section): Delete extra error
+       message arg.
+       * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Rewrite bogus
+       error message.
+       * elf32-i386.c (elf_i386_check_relocs): Make r_symndx an int.
+       * elf32-s390.c (elf_s390_check_relocs): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
+       * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
+       * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
+       * elf64-s390.c (elf_s390_check_relocs): Likewise.
+       * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+       * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Likewise.
+       * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
+       * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
+       * elf64-mmix.c (_bfd_mmix_after_linker_allocation): Cast size_t args
+       and use %lu for error message.
+       * elflink.c (elf_link_adjust_relocs): Delete extra error message arg.
+       * mmo.c (mmo_scan): Make stab_loc a file_ptr.  Cast expression for
+       error message.
+
+       * elf32-arm.c (elf32_arm_tls_relax): Correct format string and args
+       in error message.
+       (elf32_arm_final_link_relocate): Likewise.
+       * coff-arm.c (bfd_arm_process_before_allocation): Likewise.
+       * coffcode.h (styp_to_sec_flags): Likewise.
+       * cofflink.c (_bfd_coff_write_global_sym): Likewise.
+       * ecoff.c (_bfd_ecoff_slurp_symbol_table): Likewise.
+       * elf32-arc.c (arc_elf_merge_private_bfd_data): Likewise.
+       * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
+       (elf32_bfin_merge_private_bfd_data): Likewise.
+       * elf32-cris.c (cris_elf_relocate_section): Likewise.
+       * elf32-frv.c (frv_elf_merge_private_bfd_data): Likewise.
+       * elf32-i370.c (i370_elf_merge_private_bfd_data): Likewise.
+       (i370_elf_relocate_section): Likewise.
+       * elf32-iq2000.c (iq2000_elf_merge_private_bfd_data): Likewise.
+       * elf32-m32c.c (m32c_elf_merge_private_bfd_data): Likewise.
+       * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Likewise.
+       * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+       * elf32-mep.c (mep_elf_merge_private_bfd_data): Likewise.
+       * elf32-mt.c (mt_elf_merge_private_bfd_data): Likewise.
+       * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
+       * elfxx-mips.c (mips_elf_merge_obj_e_flags): Likewise.
+       (_bfd_mips_elf_merge_private_bfd_data): Likewise.
+       * ieee.c (ieee_write_id, read_id): Likewise.
+       * mach-o.c (bfd_mach_o_write_contents): Likewise.
+       (bfd_mach_o_layout_commands, bfd_mach_o_read_section_32): Likewise.
+       (bfd_mach_o_read_section_64, bfd_mach_o_read_symtab_symbol): Likewise.
+       (bfd_mach_o_read_command, bfd_mach_o_header_p): Likewise.
+       * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Likewise.
+       * stabs.c (_bfd_link_section_stabs): Likewise.
+
+       * coff-arm.c (coff_arm_relocate_section): Use L modifier in error
+       format.
+       * coff-mcore.c (coff_mcore_relocate_section): Likewise.
+       * coff-ppc.c (coff_ppc_relocate_section): Likewise.
+       * coff-rs6000.c (xcoff_reloc_type_toc): Likewise.
+       * coff-sh.c (sh_relax_section): Likewise.
+       (sh_relax_delete_bytes, sh_swap_insns): Likewise.
+       * coff-tic80.c (coff_tic80_relocate_section): Likewise.
+       * coffcode.h (coff_slurp_reloc_table): Likewise.
+       * coffgen.c (_bfd_coff_get_external_symbols): Likewise.
+       (_bfd_coff_read_string_table): Likewise.
+       * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
+       * compress.c (bfd_get_full_section_contents): Likewise.
+       * dwarf2.c (read_formatted_entries, decode_line_info): Likewise.
+       * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+       * elf.c (bfd_elf_string_from_elf_section): Likewise.
+       * elf32-arc.c (arc_special_overflow_checks): Likewise.
+       * elf32-arm.c (elf32_arm_tls_relax): Likewise.
+       (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Likewise.
+       (elf32_arm_write_section): Likewise.
+       * elf32-bfin.c (bfin_relocate_section): Likewise.
+       (bfinfdpic_relocate_section): Likewise.
+       * elf32-hppa.c (hppa_build_one_stub): Likewise.
+       (final_link_relocate, elf32_hppa_relocate_section): Likewise.
+       * elf32-i386.c (elf_i386_tls_transition): Likewise.
+       (elf_i386_relocate_section): Likewise.
+       * elf32-ip2k.c (ip2k_final_link_relocate): Likewise.
+       * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
+       * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+       * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+       * elf32-metag.c (elf_metag_relocate_section): Likewise.
+       * elf32-nds32.c (unrecognized_reloc_msg): Likewise.
+       (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2): Likewise.
+       (nds32_elf_relax_longcall3, nds32_elf_relax_longjump1): Likewise.
+       (nds32_elf_relax_longjump2, nds32_elf_relax_longjump3): Likewise.
+       (nds32_elf_relax_longcall4, nds32_elf_relax_longcall5): Likewise.
+       (nds32_elf_relax_longcall6, nds32_elf_relax_longjump4): Likewise.
+       (nds32_elf_relax_longjump5, nds32_elf_relax_longjump6): Likewise.
+       (nds32_elf_relax_longjump7, nds32_elf_relax_loadstore): Likewise.
+       (nds32_elf_relax_ptr, nds32_elf_ex9_build_hash_table): Likewise.
+       * elf32-nios2.c (nios2_elf32_relocate_section): Likewise.
+       * elf32-rx.c (UNSAFE_FOR_PID): Likewise.
+       * elf32-s390.c (invalid_tls_insn, elf_s390_relocate_section): Likewise.
+       * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
+       * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
+       * elf32-sh.c (sh_elf_relax_section): Likewise.
+       (sh_elf_relax_delete_bytes, sh_elf_swap_insns): Likewise.
+       (sh_elf_relocate_section): Likewise.
+       * elf32-sh64.c (shmedia_prepare_reloc): Likewise.
+       * elf32-spu.c (spu_elf_relocate_section): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
+       * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
+       * elf32-v850.c (v850_elf_relax_section): Likewise.
+       * elf32-vax.c (elf_vax_check_relocs): Likewise.
+       (elf_vax_relocate_section): Likewise.
+       * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+       (extend_ebb_bounds_forward, extend_ebb_bounds_backward): Likewise.
+       (compute_text_actions, compute_ebb_proposed_actions): Likewise.
+       (do_fix_for_relocatable_link): Likewise.
+       * elf64-alpha.c (elf64_alpha_relax_got_load): Likewise.
+       (elf64_alpha_relax_with_lituse): Likewise.
+       * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Likewise.
+       (elf_hppa_final_link_relocate): Likewise.
+       * elf64-ia64-vms.c (elf64_ia64_relax_section): Likewise.
+       (elf64_ia64_choose_gp, elf64_ia64_relocate_section): Likewise.
+       (elf64_vms_link_add_object_symbols): Likewise.
+       * elf64-mmix.c (mmix_elf_perform_relocation): Likewise.
+       (mmix_final_link_relocate): Likewise.
+       * elf64-s390.c (invalid_tls_insn): Likewise.
+       (elf_s390_relocate_section): Likewise.
+       * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
+       * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
+       (elf_x86_64_relocate_section): Likewise.
+       * elfcode.h (elf_slurp_symbol_table): Likewise.
+       * elfcore.h (elf_core_file_p): Likewise.
+       * elflink.c (elf_link_read_relocs_from_section): Likewise.
+       * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Likewise.
+       (elfNN_aarch64_relocate_section): Likewise.
+       * elfnn-ia64.c (elfNN_ia64_relax_section): Likewise.
+       (elfNN_ia64_choose_gp, elfNN_ia64_relocate_section): Likewise.
+       * elfnn-riscv.c (riscv_elf_relocate_section): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
+       (_bfd_mips_elf_relocate_section): Likewise.
+       (_bfd_mips_elf_finish_dynamic_symbol, mips_finish_exec_plt): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+       * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
+       * ieee.c (ieee_slurp_external_symbols): Likewise.
+       * ihex.c (ihex_write_object_content): Likewise.
+       * mach-o.c (bfd_mach_o_build_exec_seg_command): Likewise.
+       * merge.c (_bfd_merged_section_offset): Likewise.
+       * mmo.c (mmo_write_loc_chunk): Likewise.
+       (mmo_write_object_contents): Likewise.
+       * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Likewise.
+       * stabs.c (_bfd_link_section_stabs): Likewise.
+       * xcofflink.c (xcoff_link_add_symbols, xcoff_find_tc0): Likewise.
+
 2017-07-11  Alan Modra  <amodra@gmail.com>
 
        * elf32-ppc.c (ppc_elf_relocate_section): Fix typo.
index 1018d562496780d759e424455966b59a6eabf9b9..4145e1137790e193af1175f20a9e2d27d9fdb542 100644 (file)
@@ -274,8 +274,8 @@ binary_set_section_contents (bfd *abfd,
            _bfd_error_handler
              /* xgettext:c-format */
              (_("warning: writing section `%A' at huge (ie negative) "
-                "file offset 0x%lx."),
-              s, (unsigned long) s->filepos);
+                "file offset"),
+              s);
        }
 
       abfd->output_has_begun = TRUE;
index b66ebe44779025f91dfa49a2e719336849c18dab..8a2fe1a5fb334f89927b9977b043cfa898f218d1 100644 (file)
@@ -1743,8 +1743,8 @@ coff_arm_relocate_section (bfd *output_bfd,
        case bfd_reloc_outofrange:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: bad reloc address 0x%lx in section `%A'"),
-            input_bfd, (unsigned long) rel->r_vaddr, input_section);
+           (_("%B: bad reloc address %#Lx in section `%A'"),
+            input_bfd, rel->r_vaddr, input_section);
          return FALSE;
        case bfd_reloc_overflow:
          {
@@ -2068,7 +2068,7 @@ bfd_arm_process_before_allocation (bfd *                   abfd,
          if (symndx >= obj_conv_table_size (abfd))
            {
              /* xgettext:c-format */
-             _bfd_error_handler (_("%B: illegal symbol index in reloc: %d"),
+             _bfd_error_handler (_("%B: illegal symbol index in reloc: %ld"),
                                  abfd, symndx);
              continue;
            }
index 3ede76690440476ed9a8b75eeade98f168624d8e..e770afd75d6580e17773b7a2c77269a9401ab40c 100644 (file)
@@ -479,10 +479,9 @@ coff_mcore_relocate_section (bfd * output_bfd,
          _bfd_error_handler
            /* xgettext: c-format */
            (_("Warning: unsupported reloc %s <file %B, section %A>\n"
-              "sym %ld (%s), r_vaddr %ld (%lx)"),
+              "sym %ld (%s), r_vaddr %Ld (%#Lx)"),
             howto->name, input_bfd, input_section,
-            rel->r_symndx, my_name, (long) rel->r_vaddr,
-            (unsigned long) rel->r_vaddr);
+            rel->r_symndx, my_name, rel->r_vaddr, rel->r_vaddr);
          break;
 
        case IMAGE_REL_MCORE_PCREL_IMM8BY4:
index 9dca30ceed894fb60504219b7c0a7c6a6b53f4d8..66a78e7f7b0e58d8e04334b402909c5530e5d375 100644 (file)
@@ -1131,10 +1131,9 @@ coff_ppc_relocate_section (bfd *output_bfd,
                      {
                        _bfd_error_handler
                          /* xgettext: c-format */
-                         (_("%B: Relocation for %s of %lx exceeds "
+                         (_("%B: Relocation for %s of %#Lx exceeds "
                             "Toc size limit"),
-                          input_bfd, name,
-                          (unsigned long) our_toc_offset);
+                          input_bfd, name, our_toc_offset);
                        bfd_set_error (bfd_error_bad_value);
                        return FALSE;
                      }
@@ -1186,8 +1185,8 @@ coff_ppc_relocate_section (bfd *output_bfd,
              {
                _bfd_error_handler
                  /* xgettext: c-format */
-                 (_("%B: Relocation exceeds allocated TOC (%lx)"),
-                  input_bfd, (unsigned long) toc_section->size);
+                 (_("%B: Relocation exceeds allocated TOC (%#Lx)"),
+                  input_bfd, toc_section->size);
                bfd_set_error (bfd_error_bad_value);
                return FALSE;
              }
@@ -1242,10 +1241,9 @@ coff_ppc_relocate_section (bfd *output_bfd,
            _bfd_error_handler
              /* xgettext: c-format */
              (_("Warning: unsupported reloc %s <file %B, section %A>\n"
-                "sym %ld (%s), r_vaddr %ld (%lx)"),
+                "sym %ld (%s), r_vaddr %Ld (%#Lx)"),
               howto->name, input_bfd, input_section,
-              rel->r_symndx, my_name, (long) rel->r_vaddr,
-              (unsigned long) rel->r_vaddr);
+              rel->r_symndx, my_name, rel->r_vaddr, rel->r_vaddr);
          }
          break;
        case IMAGE_REL_PPC_IMGLUE:
index 3c5042fe20401a177044effb05391dfb06828d46..025c42410243c72f05238b761fd37609f4a884d3 100644 (file)
@@ -2830,7 +2830,7 @@ xcoff_reloc_type_toc (bfd *input_bfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
+           (_("%B: TOC reloc at %#Lx to symbol `%s' with no TOC entry"),
             input_bfd, rel->r_vaddr, h->root.root.string);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
index 26d296baa05e66826fab8c21c6f35e1ad6796c0c..1c483cb3e443ee5e22a125e723d509aad3ca2ac5 100644 (file)
@@ -775,8 +775,8 @@ sh_relax_section (bfd *abfd,
       if (laddr >= sec->size)
        {
          /* xgettext: c-format */
-         _bfd_error_handler (_("%B: 0x%lx: warning: bad R_SH_USES offset"),
-                             abfd, (unsigned long) irel->r_vaddr);
+         _bfd_error_handler (_("%B: %#Lx: warning: bad R_SH_USES offset"),
+                             abfd, irel->r_vaddr);
          continue;
        }
       insn = bfd_get_16 (abfd, contents + laddr);
@@ -786,8 +786,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
-            abfd, (unsigned long) irel->r_vaddr, insn);
+           (_("%B: %#Lx: warning: R_SH_USES points to unrecognized insn %#x"),
+            abfd, irel->r_vaddr, insn);
          continue;
        }
 
@@ -804,8 +804,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: 0x%lx: warning: bad R_SH_USES load offset"),
-            abfd, (unsigned long) irel->r_vaddr);
+           (_("%B: %#Lx: warning: bad R_SH_USES load offset"),
+            abfd, irel->r_vaddr);
          continue;
        }
 
@@ -829,8 +829,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: 0x%lx: warning: could not find expected reloc"),
-            abfd, (unsigned long) paddr);
+           (_("%B: %#Lx: warning: could not find expected reloc"),
+            abfd, paddr);
          continue;
        }
 
@@ -846,8 +846,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: 0x%lx: warning: symbol in unexpected section"),
-            abfd, (unsigned long) paddr);
+           (_("%B: %#Lx: warning: symbol in unexpected section"),
+            abfd, paddr);
          continue;
        }
 
@@ -972,8 +972,8 @@ sh_relax_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: 0x%lx: warning: could not find expected COUNT reloc"),
-            abfd, (unsigned long) paddr);
+           (_("%B: %#Lx: warning: could not find expected COUNT reloc"),
+            abfd, paddr);
          continue;
        }
 
@@ -982,8 +982,8 @@ sh_relax_section (bfd *abfd,
       if (irelcount->r_offset == 0)
        {
          /* xgettext: c-format */
-         _bfd_error_handler (_("%B: 0x%lx: warning: bad count"),
-                             abfd, (unsigned long) paddr);
+         _bfd_error_handler (_("%B: %#Lx: warning: bad count"),
+                             abfd, paddr);
          continue;
        }
 
@@ -1354,8 +1354,8 @@ sh_relax_delete_bytes (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext: c-format */
-               (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
-                abfd, (unsigned long) irel->r_vaddr);
+               (_("%B: %#Lx: fatal: reloc overflow while relaxing"),
+                abfd, irel->r_vaddr);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -2642,8 +2642,8 @@ sh_swap_insns (bfd *      abfd,
            {
              _bfd_error_handler
                /* xgettext: c-format */
-               (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
-                abfd, (unsigned long) irel->r_vaddr);
+               (_("%B: %#Lx: fatal: reloc overflow while relaxing"),
+                abfd, irel->r_vaddr);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
index ec1d1fd73c36067fd36b73d0756866b8fa944800..253ea94e87818c18c80a6085546be7eb3114092d 100644 (file)
@@ -667,8 +667,8 @@ coff_tic80_relocate_section (bfd *output_bfd,
        case bfd_reloc_outofrange:
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: bad reloc address 0x%lx in section `%A'"),
-            input_bfd, (unsigned long) rel->r_vaddr, input_section);
+           (_("%B: bad reloc address %#Lx in section `%A'"),
+            input_bfd, rel->r_vaddr, input_section);
          return FALSE;
        case bfd_reloc_overflow:
          {
index 4aa974136afc5ae9432d8dd2d3ce44212f41efb3..898327b3288cb8ba340baba1681c2395ae872583 100644 (file)
@@ -1311,7 +1311,7 @@ styp_to_sec_flags (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B (%s): Section flag %s (0x%x) ignored"),
+           (_("%B (%s): Section flag %s (%#lx) ignored"),
             abfd, name, unhandled, flag);
          result = FALSE;
        }
@@ -3765,7 +3765,7 @@ coff_write_object_contents (bfd * abfd)
                  _bfd_error_handler
                    /* xgettext:c-format */
                    (_("%B: section %A: string table overflow at offset %ld"),
-                   abfd, current, string_size);
+                   abfd, current, (unsigned long) string_size);
                  return FALSE;
                }
 
@@ -4607,7 +4607,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect)
       if (cache_ptr->line_number == 0)
        {
          combined_entry_type * ent;
-         bfd_vma symndx;
+         unsigned long symndx;
          coff_symbol_type *sym;
 
          have_func = FALSE;
@@ -4617,7 +4617,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect)
              _bfd_error_handler
                /* xgettext:c-format */
                (_("%B: warning: illegal symbol index 0x%lx in line number entry %d"),
-                abfd, (long) symndx, counter);
+                abfd, symndx, counter);
              cache_ptr->line_number = -1;
              ret = FALSE;
              continue;
@@ -4631,7 +4631,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect)
              _bfd_error_handler
                /* xgettext:c-format */
                (_("%B: warning: illegal symbol index 0x%lx in line number entry %d"),
-                abfd, (long) symndx, counter);
+                abfd, symndx, counter);
              cache_ptr->line_number = -1;
              ret = FALSE;
              continue;
@@ -5319,7 +5319,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
              _bfd_error_handler
                /* xgettext:c-format */
                (_("%B: warning: illegal symbol index %ld in relocs"),
-                abfd, (long) dst.r_symndx);
+                abfd, dst.r_symndx);
              cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
              ptr = NULL;
            }
@@ -5358,8 +5358,8 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: illegal relocation type %d at address 0x%lx"),
-            abfd, dst.r_type, (long) dst.r_vaddr);
+           (_("%B: illegal relocation type %d at address %#Lx"),
+            abfd, dst.r_type, dst.r_vaddr);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
index 31c2c5a1baa620fb181dd49d6dab7e954627729c..d7cdf8f614e16d9f375be5f200651434d6f9cdd3 100644 (file)
@@ -1645,7 +1645,7 @@ _bfd_coff_get_external_symbols (bfd *abfd)
   if (syms == NULL)
     {
       /* PR 21013: Provide an error message when the alloc fails.  */
-      _bfd_error_handler (_("%B: Not enough memory to allocate space for %lu symbols"),
+      _bfd_error_handler (_("%B: Not enough memory to allocate space for %Lu symbols"),
                          abfd, size);
       return FALSE;
     }
@@ -1713,7 +1713,7 @@ _bfd_coff_read_string_table (bfd *abfd)
     {
       _bfd_error_handler
        /* xgettext: c-format */
-       (_("%B: bad string table size %lu"), abfd, (unsigned long) strsize);
+       (_("%B: bad string table size %Lu"), abfd, strsize);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
index aa84a3512805c8a0c65a370c3959db930fdcd5a9..32d62bd9b87208cbab2c20bf45e6e225cb7f73ae 100644 (file)
@@ -2727,7 +2727,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
                      || bfd_link_relocatable (flaginfo->info)))
                _bfd_error_handler
                  /* xgettext: c-format */
-                 (_("%B: %A: reloc overflow: 0x%lx > 0xffff"),
+                 (_("%B: %A: reloc overflow: %#x > 0xffff"),
                   output_bfd, sec, sec->reloc_count);
 
              if (sec->lineno_count > 0xffff
@@ -2735,7 +2735,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data)
                      || bfd_link_relocatable (flaginfo->info)))
                _bfd_error_handler
                  /* xgettext: c-format */
-                 (_("%B: warning: %A: line number overflow: 0x%lx > 0xffff"),
+                 (_("%B: warning: %A: line number overflow: %#x > 0xffff"),
                   output_bfd, sec, sec->lineno_count);
 
              auxp->x_scn.x_nreloc = sec->reloc_count;
@@ -3120,8 +3120,8 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
        case bfd_reloc_outofrange:
          _bfd_error_handler
            /* xgettext: c-format */
-           (_("%B: bad reloc address 0x%lx in section `%A'"),
-            input_bfd, (unsigned long) rel->r_vaddr, input_section);
+           (_("%B: bad reloc address %#Lx in section `%A'"),
+            input_bfd, rel->r_vaddr, input_section);
          return FALSE;
        case bfd_reloc_overflow:
          {
index ef549f9db02eac008fccdadacd0622bc4965228a..a9dcbc05f537197cd5c1797aee2a2e71b2eb1200 100644 (file)
@@ -252,8 +252,8 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
              if (bfd_get_error () == bfd_error_no_memory)
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("error: %B(%A) is too large (%#lx bytes)"),
-                 abfd, sec, (long) sz);
+                 (_("error: %B(%A) is too large (%#Lx bytes)"),
+                 abfd, sec, sz);
              return FALSE;
            }
        }
index 04a2585be23d247213cebcd654b57178f9424996..22d6d56407febe72669f01905c350657f4b62453 100644 (file)
@@ -573,9 +573,9 @@ read_section (bfd *           abfd,
   if (offset != 0 && offset >= *section_size)
     {
       /* xgettext: c-format */
-      _bfd_error_handler (_("Dwarf Error: Offset (%lu)"
-                           " greater than or equal to %s size (%lu)."),
-                         (long) offset, section_name, *section_size);
+      _bfd_error_handler (_("Dwarf Error: Offset (%llu)"
+                           " greater than or equal to %s size (%Lu)."),
+                         (long long) offset, section_name, *section_size);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -1943,8 +1943,8 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp,
              break;
            default:
              _bfd_error_handler
-               (_("Dwarf Error: Unknown format content type %lu."),
-                (unsigned long) content_type);
+               (_("Dwarf Error: Unknown format content type %Lu."),
+                content_type);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -2047,8 +2047,8 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
   if (stash->dwarf_line_size < 16)
     {
       _bfd_error_handler
-       (_("Dwarf Error: Line info section is too small (%ld)"),
-        (long) stash->dwarf_line_size);
+       (_("Dwarf Error: Line info section is too small (%Ld)"),
+        stash->dwarf_line_size);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
@@ -2077,8 +2077,8 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
     {
       _bfd_error_handler
        /* xgettext: c-format */
-       (_("Dwarf Error: Line info data is bigger (0x%lx) than the section (0x%lx)"),
-        (long) lh.total_length, (long) stash->dwarf_line_size);
+       (_("Dwarf Error: Line info data is bigger (%#Lx) than the section (%#Lx)"),
+        lh.total_length, stash->dwarf_line_size);
       bfd_set_error (bfd_error_bad_value);
       return NULL;
     }
@@ -2854,7 +2854,8 @@ find_abstract_instance_name (struct comp_unit *unit,
       if (info_ptr == NULL)
        {
          _bfd_error_handler
-           (_("Dwarf Error: Unable to read alt ref %u."), die_ref);
+           (_("Dwarf Error: Unable to read alt ref %llu."),
+            (long long) die_ref);
          bfd_set_error (bfd_error_bad_value);
          return NULL;
        }
index ef5dc5e8398aea7aa1fc9488627e3f69198118c2..4bda9dc4cf048d00cc7599201bb82ebba15a11dc 100644 (file)
@@ -961,7 +961,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd)
       bfd_get_symcount (abfd) = internal_ptr - internal;
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: warning: isymMax (%ld) is greater than ifdMax (%d)\n"),
+       (_("%B: warning: isymMax (%ld) is greater than ifdMax (%ld)"),
         abfd, ecoff_data (abfd)->debug_info.symbolic_header.isymMax,
         ecoff_data (abfd)->debug_info.symbolic_header.ifdMax);
     }
index e59f083e04de6955b434ab010b8971989e20940f..97301c8849d8c8334722acf97cfb212aaec0bb46 100644 (file)
@@ -2094,10 +2094,10 @@ mn10300_elf_relocate_section (bfd *output_bfd,
 
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+             (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
               input_bfd,
               input_section,
-              (long) rel->r_offset,
+              rel->r_offset,
               howto->name,
               h->root.root.root.string);
        }
index dcb06383d96523cdb33f6a9367934915bfe419cd..a93793031485dd50b82d4ed8d4fbd9ba2e6a41aa 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -354,8 +354,8 @@ bfd_elf_string_from_elf_section (bfd *abfd,
       unsigned int shstrndx = elf_elfheader(abfd)->e_shstrndx;
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: invalid string offset %u >= %lu for section `%s'"),
-        abfd, strindex, (unsigned long) hdr->sh_size,
+       (_("%B: invalid string offset %u >= %Lu for section `%s'"),
+        abfd, strindex, hdr->sh_size,
         (shindex == shstrndx && strindex == hdr->sh_name
          ? ".shstrtab"
          : bfd_elf_string_from_elf_section (abfd, shstrndx, hdr->sh_name)));
index 6903ad745b9cd23243e8b70d168a335c461f7f77..93b21de46852c77dfb7dd71bc695b39e270e8a93 100644 (file)
@@ -888,9 +888,9 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
          /* Warn if different flags.  */
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: uses different e_flags (0x%lx) fields than "
-              "previous modules (0x%lx)"),
-            ibfd, (long) in_flags, (long) out_flags);
+           (_("%B: uses different e_flags (%#x) fields than "
+              "previous modules (%#x)"),
+            ibfd, in_flags, out_flags);
          if (in_flags && out_flags)
            return FALSE;
          /* MWDT doesnt set the eflags hence make sure we choose the
@@ -1116,26 +1116,26 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
          if (reloc_data.reloc_addend == 0)
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): CMEM relocation to `%s' is invalid, "
-                "16 MSB should be 0x%04x (value is 0x%lx)"),
+             (_("%B(%A+%#Lx): CMEM relocation to `%s' is invalid, "
+                "16 MSB should be %#x (value is %#Lx)"),
               reloc_data.input_section->owner,
               reloc_data.input_section,
               reloc_data.reloc_offset,
               reloc_data.symbol_name,
               NPS_CMEM_HIGH_VALUE,
-              (relocation));
+              relocation);
          else
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): CMEM relocation to `%s+0x%lx' is invalid, "
-                "16 MSB should be 0x%04x (value is 0x%lx)"),
+             (_("%B(%A+%#Lx): CMEM relocation to `%s+%#Lx' is invalid, "
+                "16 MSB should be %#x (value is %#Lx)"),
               reloc_data.input_section->owner,
               reloc_data.input_section,
               reloc_data.reloc_offset,
               reloc_data.symbol_name,
               reloc_data.reloc_addend,
               NPS_CMEM_HIGH_VALUE,
-              (relocation));
+              relocation);
          return bfd_reloc_overflow;
        }
       break;
index b9f5d04a56dcf389d71620e166006f9c278a3f16..4277168b9bd2984430b29d4bf6bea64915853c30 100644 (file)
@@ -4140,7 +4140,7 @@ arm_type_of_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);
            }
 
          /* We have an extra 2-bytes reach because of
@@ -8615,12 +8615,12 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd,
                          {
                            _bfd_error_handler
                              /* xgettext:c-format */
-                             (_("%B(%A+0x%lx): error: multiple load detected"
+                             (_("%B(%A+%#x): error: multiple load detected"
                                 " in non-last IT block instruction :"
                                 " STM32L4XX veneer cannot be generated.\n"
                                 "Use gcc option -mrestrict-it to generate"
                                 " only one instruction per IT block.\n"),
-                              abfd, sec, (long) i);
+                              abfd, sec, i);
                          }
                        else
                          {
@@ -9720,8 +9720,8 @@ elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
              | bfd_get_16 (input_bfd, contents + rel->r_offset + 2);
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unexpected Thumb instruction '0x%x' in TLS trampoline"),
-            input_bfd, input_sec, (unsigned long)rel->r_offset, insn);
+           (_("%B(%A+%#Lx): unexpected Thumb instruction '%#lx' in TLS trampoline"),
+            input_bfd, input_sec, rel->r_offset, insn);
          return bfd_reloc_notsupported;
        }
       break;
@@ -9760,8 +9760,8 @@ elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unexpected ARM instruction '0x%x' in TLS trampoline"),
-            input_bfd, input_sec, (unsigned long)rel->r_offset, insn);
+           (_("%B(%A+%#Lx): unexpected ARM instruction '%#lx' in TLS trampoline"),
+            input_bfd, input_sec, rel->r_offset, insn);
          return bfd_reloc_notsupported;
        }
       break;
@@ -11524,9 +11524,8 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B(%A+0x%lx): unexpected Thumb instruction '0x%x' referenced by TLS_GOTDESC"),
-                      input_bfd, input_section,
-                      (unsigned long)rel->r_offset, insn);
+                     (_("%B(%A+%#Lx): unexpected Thumb instruction '%#lx' referenced by TLS_GOTDESC"),
+                      input_bfd, input_section, rel->r_offset, insn);
                    return bfd_reloc_notsupported;
                  }
              }
@@ -11548,9 +11547,8 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
                  default:
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B(%A+0x%lx): unexpected ARM instruction '0x%x' referenced by TLS_GOTDESC"),
-                      input_bfd, input_section,
-                      (unsigned long)rel->r_offset, insn);
+                     (_("%B(%A+%#Lx): unexpected ARM instruction '%#lx' referenced by TLS_GOTDESC"),
+                      input_bfd, input_section, rel->r_offset, insn);
                    return bfd_reloc_notsupported;
                  }
              }
@@ -11578,9 +11576,8 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"),
-            input_bfd, input_section,
-            (long) rel->r_offset, howto->name);
+           (_("%B(%A+%#Lx): %s relocation not permitted in shared object"),
+            input_bfd, input_section, rel->r_offset, howto->name);
          return bfd_reloc_notsupported;
        }
       else
@@ -11792,9 +11789,8 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
              {
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
-                 input_bfd, input_section,
-                 (long) rel->r_offset, howto->name);
+                 (_("%B(%A+%#Lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
+                 input_bfd, input_section, rel->r_offset);
                return bfd_reloc_overflow;
              }
 
@@ -11833,10 +11829,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
-             input_bfd, input_section,
-              (long) rel->r_offset, signed_value < 0 ? - signed_value : signed_value,
-              howto->name);
+             (_("%B(%A+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
+              input_bfd, input_section, rel->r_offset,
+              signed_value < 0 ? -signed_value : signed_value, howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -11924,9 +11919,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
-              input_bfd, input_section,
-              (long) rel->r_offset, labs (signed_value), howto->name);
+             (_("%B(%A+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
+              input_bfd, input_section, rel->r_offset,
+              signed_value < 0 ? -signed_value : signed_value, howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -12010,9 +12005,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
-              input_bfd, input_section,
-              (long) rel->r_offset, labs (signed_value), howto->name);
+             (_("%B(%A+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
+              input_bfd, input_section, rel->r_offset,
+              signed_value < 0 ? -signed_value : signed_value, howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -12098,9 +12093,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
-             input_bfd, input_section,
-             (long) rel->r_offset, labs (signed_value), howto->name);
+             (_("%B(%A+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
+              input_bfd, input_section, rel->r_offset,
+              signed_value < 0 ? -signed_value : signed_value, howto->name);
            return bfd_reloc_overflow;
          }
 
@@ -12362,9 +12357,9 @@ elf32_arm_relocate_section (bfd *                  output_bfd,
                        {
                          _bfd_error_handler
                            /* xgettext:c-format */
-                           (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+                           (_("%B(%A+%#Lx): %s relocation against SEC_MERGE section"),
                             input_bfd, input_section,
-                            (long) rel->r_offset, howto->name);
+                            rel->r_offset, howto->name);
                          return FALSE;
                        }
 
@@ -12474,12 +12469,12 @@ elf32_arm_relocate_section (bfd *                  output_bfd,
          _bfd_error_handler
            ((sym_type == STT_TLS
              /* xgettext:c-format */
-             ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+             ? _("%B(%A+%#Lx): %s used with TLS symbol %s")
              /* xgettext:c-format */
-             : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
+             : _("%B(%A+%#Lx): %s used with non-TLS symbol %s")),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             name);
        }
@@ -12529,10 +12524,10 @@ elf32_arm_relocate_section (bfd *                  output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -14541,7 +14536,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
       Elf_Internal_Sym *isym;
       struct elf_link_hash_entry *h;
       struct elf32_arm_link_hash_entry *eh;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       int r_type;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
@@ -18593,11 +18588,11 @@ elf32_arm_write_section (bfd *output_bfd,
                      branch_to_veneer - (1 << 24) : 0;
 
                    _bfd_error_handler
-                     (_("%B(%#x): error: Cannot create STM32L4XX veneer. "
-                        "Jump out of range by %ld bytes. "
+                     (_("%B(%#Lx): error: Cannot create STM32L4XX veneer. "
+                        "Jump out of range by %Ld bytes. "
                         "Cannot encode branch instruction. "),
                       output_bfd,
-                      (long) (stm32l4xx_errnode->vma - 4),
+                      stm32l4xx_errnode->vma - 4,
                       out_of_range);
                    continue;
                  }
index b3e09bd9792949d6178a77fa9248aa3813865c06..09e50ce6166ac9120c4620c96e3c6c6644a69668 100644 (file)
@@ -1578,9 +1578,9 @@ bfin_relocate_section (bfd * output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable relocation against symbol `%s'"),
             input_bfd,
-            input_section, (long) rel->r_offset, h->root.root.string);
+            input_section, rel->r_offset, h->root.root.string);
          return FALSE;
        }
 
@@ -1609,9 +1609,8 @@ bfin_relocate_section (bfd * output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): reloc against `%s': error %d"),
-                input_bfd, input_section,
-                (long) rel->r_offset, name, (int) r);
+               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
+                input_bfd, input_section, rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
@@ -2703,7 +2702,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"),
+               (_("%B: relocation at `%A+%#Lx' references symbol `%s' with nonzero addend"),
                 input_bfd, input_section, rel->r_offset, name);
              return FALSE;
 
@@ -4874,8 +4873,8 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
        bad_reloc:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: unsupported relocation type %i"),
-            abfd, ELF32_R_TYPE (rel->r_info));
+           (_("%B: unsupported relocation type %d"),
+            abfd, (int) ELF32_R_TYPE (rel->r_info));
          return FALSE;
         }
     }
@@ -4949,7 +4948,7 @@ elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   if (0)
 #endif
   _bfd_error_handler
-    ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %B",
+    ("old_flags = 0x%.8x, new_flags = 0x%.8x, init = %s, filename = %B",
      old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no", ibfd);
 
   if (!elf_flags_init (obfd))                  /* First call, no flags set.  */
index 83c410181cafdc7daa97c1712cd451a3413d2418..2661f2b891b7ead0651c4e89e8f7f71946cc8f8f 100644 (file)
@@ -1301,7 +1301,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                if (h == NULL)
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B, section %A: relocation %s with non-zero addend %d"
+                   (_("%B, section %A: relocation %s with non-zero addend %Ld"
                       " against local symbol"),
                     input_bfd,
                     input_section,
@@ -1310,7 +1310,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                else
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B, section %A: relocation %s with non-zero addend %d"
+                   (_("%B, section %A: relocation %s with non-zero addend %Ld"
                       " against symbol `%s'"),
                     input_bfd,
                     input_section,
@@ -1657,7 +1657,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                 to pass us these kinds of things.  */
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B, section %A: relocation %s with non-zero addend %d"
+               (_("%B, section %A: relocation %s with non-zero addend %Ld"
                   " against symbol `%s'"),
                 input_bfd,
                 input_section,
@@ -1810,7 +1810,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                 things.  */
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B, section %A: relocation %s with non-zero addend %d"
+               (_("%B, section %A: relocation %s with non-zero addend %Ld"
                   " against symbol `%s'"),
                 input_bfd,
                 input_section,
@@ -3230,7 +3230,7 @@ cris_elf_check_relocs (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B, section %A:\n  v10/v32 compatible object %s"
+                   (_("%B, section %A:\n  v10/v32 compatible object"
                       " must not contain a PIC relocation"),
                     abfd, sec);
                  return FALSE;
index ef609ff54068f89c09b089fd973081a946549d6c..971073cf78ba634c9be5e7a15bfd2f58c65f9e7a 100644 (file)
@@ -6355,7 +6355,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 
 #ifdef DEBUG
   _bfd_error_handler
-    ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
+    ("old_flags = 0x%.8x, new_flags = 0x%.8x, init = %s, filename = %s",
      old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
      bfd_get_filename (ibfd));
 #endif
@@ -6574,9 +6574,9 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
          error = TRUE;
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: uses different unknown e_flags (0x%lx) fields"
-              " than previous modules (0x%lx)"),
-            ibfd, (long) new_partial, (long) old_partial);
+           (_("%B: uses different unknown e_flags (%#x) fields"
+              " than previous modules (%#x)"),
+            ibfd, new_partial, old_partial);
        }
     }
 
index 0087c71a60672bdfd4f365cec960900761e1d5ee..1f2466e398713945e20ea8225fd538194b6532a0 100644 (file)
@@ -836,10 +836,10 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
+           (_("%B(%A+%#Lx): cannot reach %s, recompile with -ffunction-sections"),
             hsh->target_section->owner,
             stub_sec,
-            (long) hsh->stub_offset,
+            hsh->stub_offset,
             hsh->bh_root.string);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -3430,10 +3430,10 @@ final_link_relocate (asection *input_section,
                   error.  */
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
+                 (_("%B(%A+%#Lx): %s fixup for insn %#x is not supported in a non-shared link"),
                   input_bfd,
                   input_section,
-                  (long) offset,
+                  offset,
                   howto->name,
                   insn);
            }
@@ -3596,10 +3596,10 @@ final_link_relocate (asection *input_section,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"),
+       (_("%B(%A+%#Lx): cannot reach %s, recompile with -ffunction-sections"),
         input_bfd,
         input_section,
-        (long) offset,
+        offset,
         hsh->bh_root.string);
       bfd_set_error (bfd_error_bad_value);
       return bfd_reloc_notsupported;
@@ -4287,10 +4287,10 @@ elf32_hppa_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): cannot handle %s for %s"),
+               (_("%B(%A+%#Lx): cannot handle %s for %s"),
                 input_bfd,
                 input_section,
-                (long) rela->r_offset,
+                rela->r_offset,
                 howto->name,
                 sym_name);
              bfd_set_error (bfd_error_bad_value);
index 4c40b790bbb9cd6358255ab28a9c60bcdcaa4080..f305515b9495aafea60b6ddf8f17ae368355e0f2 100644 (file)
@@ -356,8 +356,8 @@ i370_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-        ibfd, (long) new_flags, (long) old_flags);
+       (_("%B: uses different e_flags (%#x) fields than previous modules (%#x)"),
+        ibfd, new_flags, old_flags);
 
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
@@ -1053,9 +1053,9 @@ i370_elf_relocate_section (bfd *output_bfd,
   bfd_boolean ret = TRUE;
 
 #ifdef DEBUG
-  _bfd_error_handler ("i370_elf_relocate_section called for %B section %A, %ld relocations%s",
+  _bfd_error_handler ("i370_elf_relocate_section called for %B section %A, %u relocations%s",
                      input_bfd, input_section,
-                     (long) input_section->reloc_count,
+                     input_section->reloc_count,
                      (bfd_link_relocatable (info)) ? " (relocatable)" : "");
 #endif
 
index df16775d54aba83aeb3df279c18e989f3055d1ec..9d9c8abcc326dfc06a8094f7e4bbe0afea00bad8 100644 (file)
@@ -1708,10 +1708,10 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd,
 
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: TLS transition from %s to %s against `%s' at 0x%lx "
+       (_("%B: TLS transition from %s to %s against `%s' at %#Lx "
           "in section `%A' failed"),
         abfd, from->name, to->name, name,
-        (unsigned long) rel->r_offset, sec);
+        rel->r_offset, sec);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -2037,7 +2037,7 @@ elf_i386_check_relocs (bfd *abfd,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       struct elf_i386_link_hash_entry *eh;
       Elf_Internal_Sym *isym;
@@ -5369,10 +5369,10 @@ disallow_got32:
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -5409,9 +5409,9 @@ check_relocation_error:
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                (long) rel->r_offset, name, (int) r);
+                rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 9c37c1c9657a6211fe9db416b3914ec694d80928..bf4f5cc7b460c557fa6ff56224dd0d674c6cc1ed 100644 (file)
@@ -1295,7 +1295,7 @@ ip2k_final_link_relocate (reloc_howto_type *  howto,
              ip2k_nominal_page_bits (input_bfd, input_section,
                                      rel->r_offset, contents))
            /* xgettext:c-format */
-           _bfd_error_handler (_("ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."),
+           _bfd_error_handler (_("ip2k linker: missing page instruction at %#Lx (dest = %#Lx)"),
                                BASEADDR (input_section) + rel->r_offset,
                                relocation + rel->r_addend);
         }
@@ -1312,7 +1312,7 @@ ip2k_final_link_relocate (reloc_howto_type *  howto,
                  ip2k_nominal_page_bits (input_bfd, input_section,
                                          rel->r_offset - 2, contents)))
            /* xgettext:c-format */
-           _bfd_error_handler (_("ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."),
+           _bfd_error_handler (_("ip2k linker: redundant page instruction at %#Lx (dest = %#Lx)"),
                                page_addr,
                                relocation + rel->r_addend);
         }
index c17097d647f30f740cf698426c3f53d965af0d94..0260cc3fc5cf1def33783fcc648de4b006a02d41 100644 (file)
@@ -843,8 +843,8 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-            ibfd, (long)new_flags, (long)old_flags);
+           (_("%B: uses different e_flags (%#x) fields than previous modules (%#x)"),
+            ibfd, new_flags, old_flags);
        }
     }
 
index aabf49fb4bcc48f7c86b16db794e940c1eef1870..656f48b43c26ca1686b0c7c821cc5f201b0be293 100644 (file)
@@ -1497,7 +1497,7 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
               != (lm32fdpic_fixup32_section (info)->reloc_count * 4))
         {
          _bfd_error_handler
-            ("LINKER BUG: .rofixup section size mismatch: size/4 %d != relocs %d",
+            ("LINKER BUG: .rofixup section size mismatch: size/4 %Ld != relocs %d",
             lm32fdpic_fixup32_section (info)->size/4,
             lm32fdpic_fixup32_section (info)->reloc_count);
           return FALSE;
@@ -1519,7 +1519,7 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd,
           if (hend->u.def.value != value)
             {
              _bfd_error_handler
-                ("LINKER BUG: .rofixup section hend->u.def.value != value: %ld != %ld", hend->u.def.value, value);
+                ("LINKER BUG: .rofixup section hend->u.def.value != value: %Ld != %Ld", hend->u.def.value, value);
               return FALSE;
             }
         }
index 9658d17d17bf45dedaff304611063bc1bb359157..2cb28b21d78d9718a2a7128ed5df8dfc99c7b7c3 100644 (file)
@@ -826,7 +826,7 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 
 #ifdef DEBUG
   _bfd_error_handler
-    ("old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s, filename = %s",
+    ("old_flags = 0x%.8x, new_flags = 0x%.8x, init = %s, filename = %s",
      old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no",
      bfd_get_filename (ibfd));
 #endif
@@ -887,9 +887,9 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
          error = TRUE;
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: uses different e_flags (0x%lx) fields"
-              " than previous modules (0x%lx)"),
-            ibfd, (long) new_flags, (long) old_flags);
+           (_("%B: uses different e_flags (%#x) fields"
+              " than previous modules (%#x)"),
+            ibfd, new_flags, old_flags);
        }
     }
 
index 90408237d4ac3ba13867c9c18184c698ce7b384f..d4e4423d6210269833d661588ff3575041d55906 100644 (file)
@@ -2537,10 +2537,11 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+                   (_("%B(%A+%#Lx): unresolvable %s relocation "
+                      "against symbol `%s'"),
                     input_bfd,
                     input_section,
-                    (long) rel->r_offset,
+                    rel->r_offset,
                     howto->name,
                     h->root.root.string);
                }
index 96fc96ff745ff349bc7c6a7fe631b37e13b8f90b..cc6eb2d3f18c4303de38f2888ab55c53f42af7bf 100644 (file)
@@ -1385,8 +1385,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-        ibfd, (unsigned long) new_flags, (unsigned long) old_flags);
+       (_("%B: uses different e_flags (%#x) fields than previous modules (%#x)"),
+        ibfd, new_flags, old_flags);
       ok = FALSE;
     }
 
index 6f587201590d094bad1fd721657b21da7007f5ce..5b64589b21d2344094ab76359289394305f33636 100644 (file)
@@ -3887,9 +3887,8 @@ elf_m68k_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): R_68K_TLS_LE32 relocation not permitted "
-                  "in shared object"),
-                input_bfd, input_section, (long) rel->r_offset, howto->name);
+               (_("%B(%A+%#Lx): %s relocation not permitted in shared object"),
+                input_bfd, input_section, rel->r_offset, howto->name);
 
              return FALSE;
            }
@@ -4081,10 +4080,10 @@ elf_m68k_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -4117,12 +4116,12 @@ elf_m68k_relocate_section (bfd *output_bfd,
              _bfd_error_handler
                ((sym_type == STT_TLS
                  /* xgettext:c-format */
-                 ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+                 ? _("%B(%A+%#Lx): %s used with TLS symbol %s")
                  /* xgettext:c-format */
-                 : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
+                 : _("%B(%A+%#Lx): %s used with non-TLS symbol %s")),
                 input_bfd,
                 input_section,
-                (long) rel->r_offset,
+                rel->r_offset,
                 howto->name,
                 name);
            }
@@ -4157,9 +4156,9 @@ elf_m68k_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                (long) rel->r_offset, name, (int) r);
+                rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 0037129e94c95799c2c226bd358fe84c3f6270c9..5ecf1c63e7f9d477c85158f28391b7b1c53382a0 100644 (file)
@@ -408,10 +408,10 @@ mcore_elf_relocate_section (bfd * output_bfd,
 
 #ifdef DEBUG
   _bfd_error_handler
-    ("mcore_elf_relocate_section called for %B section %A, %ld relocations%s",
+    ("mcore_elf_relocate_section called for %B section %A, %u relocations%s",
      input_bfd,
      input_section,
-     (long) input_section->reloc_count,
+     input_section->reloc_count,
      (bfd_link_relocatable (info)) ? " (relocatable)" : "");
 #endif
 
index 32305c5b72b0dccd0e6c34285919023f11448f5e..7d0e454aec2e6fc390d911c8965218aa585b8132 100644 (file)
@@ -585,7 +585,7 @@ mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   old_flags = elf_elfheader (obfd)->e_flags;
 
 #ifdef DEBUG
-  _bfd_error_handler ("%B: old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s",
+  _bfd_error_handler ("%B: old_flags = 0x%.8x, new_flags = 0x%.8x, init = %s",
                      ibfd, old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no");
 #endif
 
index 94eda95309385782c25e15b106e9d927da395b46..a62cfa0558cdc35e86d5e91313f56223eb187f92 100644 (file)
@@ -1873,7 +1873,7 @@ elf_metag_relocate_section (bfd *output_bfd,
                        /* PR 20675 */
                        if (bfd_link_pic (info))
                          _bfd_error_handler (_("%B(%A): multiple TLS models are not supported"),
-                                             input_bfd, input_section, name);
+                                             input_bfd, input_section);
                        else
                          _bfd_error_handler (_("%B(%A): shared library symbol %s encountered whilst performing a static link"),
                                              input_bfd, input_section, name);
@@ -1928,9 +1928,8 @@ elf_metag_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): R_METAG_TLS_LE/IENONPIC relocation not permitted in shared object"),
-                input_bfd, input_section,
-                (long) rel->r_offset, howto->name);
+               (_("%B(%A+%#Lx): %s relocation not permitted in shared object"),
+                input_bfd, input_section, rel->r_offset, howto->name);
              return FALSE;
            }
          else
index db89f8c86e75665d20dc27489e85547e17a05c18..b4625d46f7a9a060f39165bf2f18492256146d79 100644 (file)
@@ -524,7 +524,7 @@ mt_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
   old_flags = elf_elfheader (obfd)->e_flags;
 
 #ifdef DEBUG
-  _bfd_error_handler ("%B: old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s",
+  _bfd_error_handler ("%B: old_flags = 0x%.8x, new_flags = 0x%.8x, init = %s",
                      ibfd, old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no");
 #endif
 
index 94fb0374396a2a59d6fac1b9c73a3de0e3ef5613..d6b58aaed17d4052cacd4f54f8b6880f04628af4 100644 (file)
@@ -8986,7 +8986,7 @@ relax_range_measurement (bfd *abfd)
 
 static const char * unrecognized_reloc_msg =
   /* xgettext:c-format */
-  N_("%B: warning: %s points to unrecognized reloc at 0x%lx.");
+  N_("%B: warning: %s points to unrecognized reloc at %#Lx");
 
 /* Relax LONGCALL1 relocation for nds32_elf_relax_section.  */
 
@@ -9039,7 +9039,7 @@ nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL1",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9120,7 +9120,7 @@ nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (i1_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL2",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9226,7 +9226,7 @@ nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL3",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9360,7 +9360,7 @@ nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP1",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9566,7 +9566,7 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (i2_irelfn == irelend || cond_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP2",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9758,7 +9758,7 @@ nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irelfn == irelend || lo_irelfn == irelend || cond_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP3",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9938,7 +9938,7 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -9968,7 +9968,7 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (ptr_irel == irelend || em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
   /* Check these is enough space to insert jal in R_NDS32_EMPTY.  */
@@ -10039,7 +10039,7 @@ nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (cond_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL5",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10117,7 +10117,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10155,7 +10155,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
       if (cond_irel == irelend)
        {
          _bfd_error_handler (unrecognized_reloc_msg, abfd,
-                             "R_NDS32_LONGCALL6", (long) irel->r_offset);
+                             "R_NDS32_LONGCALL6", irel->r_offset);
          return FALSE;
        }
       cond_irel->r_addend = 1;
@@ -10204,7 +10204,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
       if (cond_irel == irelend)
        {
          _bfd_error_handler (unrecognized_reloc_msg, abfd,
-                             "R_NDS32_LONGCALL6", (long) irel->r_offset);
+                             "R_NDS32_LONGCALL6", irel->r_offset);
          return FALSE;
        }
       cond_irel->r_addend = 1;
@@ -10254,7 +10254,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (hi_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10276,7 +10276,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (ptr_irel == irelend || em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10350,7 +10350,7 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (cond_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP5",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10479,7 +10479,7 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (em_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP6",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10649,7 +10649,7 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (cond_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP7",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -10754,7 +10754,7 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd,
   if (hi_irelfn == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LOADSTORE",
-                         (long) irel->r_offset);
+                         irel->r_offset);
        return FALSE;
     }
 
@@ -11228,7 +11228,7 @@ nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel,
   if (re_irel == irelend)
     {
       _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_PTR",
-                         (long) irel->r_offset);
+                         irel->r_offset);
       return FALSE;
     }
 
@@ -15433,8 +15433,8 @@ nds32_elf_ex9_build_hash_table (bfd *abfd, asection *sec,
                          /* Incorrect alignment.  */
                          _bfd_error_handler
                            /* xgettext:c-format */
-                           (_("%B: warning: unaligned small data access. "
-                              "For entry: {%d, %d, %d}, addr = 0x%x, align = 0x%x."),
+                           (_("%B: warning: unaligned small data access "
+                              "for entry: {%Ld, %Ld, %Ld}, addr = %#Lx, align = %#x"),
                             abfd, irel->r_offset,
                             irel->r_info, irel->r_addend, relocation, align);
                          off += 4;
@@ -15466,7 +15466,7 @@ nds32_elf_ex9_build_hash_table (bfd *abfd, asection *sec,
          if (entry == NULL)
            {
              _bfd_error_handler
-               (_("%P%F: failed creating ex9.it %s hash table: %E\n"), code);
+               (_("failed creating ex9.it %s hash table entry"), code);
              return FALSE;
            }
          if (h)
index 50a09ead815c949e25aefddbc9bae5dc806624fd..860a3d7af5004574f51d8dbf4a46132487a70845 100644 (file)
@@ -4369,10 +4369,10 @@ nios2_elf32_relocate_section (bfd *output_bfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B(%A+0x%lx): R_NIOS2_TLS_LE16 relocation not "
+                   (_("%B(%A+%#Lx): %s relocation not "
                       "permitted in shared object"),
                     input_bfd, input_section,
-                    (long) rel->r_offset, howto->name);
+                    rel->r_offset, howto->name);
                  return FALSE;
                }
              else
index bb2b3079c172138efbc4279bb252d43abe4e3b8f..f81988b93238a27c1ec7b87a02654c3098de5bfb 100644 (file)
@@ -683,7 +683,7 @@ rx_elf_relocate_section
          && strcmp (name, "__romdatastart") != 0                       \
          && !saw_subtract)                                             \
        /* xgettext:c-format */                                         \
-       _bfd_error_handler (_("%B(%A): unsafe PID relocation %s at 0x%08lx (against %s in %s)"), \
+       _bfd_error_handler (_("%B(%A): unsafe PID relocation %s at %#Lx (against %s in %s)"), \
                            input_bfd, input_section, howto->name,      \
                            input_section->output_section->vma + input_section->output_offset + rel->r_offset, \
                            name, sec->name);                           \
index c26bdcf900a666b4a267372674edabc4570bc2ab..ddbeb97dfcd5a17dfa90339b4978b4d6fd8bea7f 100644 (file)
@@ -945,7 +945,7 @@ elf_s390_check_relocs (bfd *abfd,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
 
       r_symndx = ELF32_R_SYM (rel->r_info);
@@ -2307,10 +2307,10 @@ invalid_tls_insn (bfd *input_bfd,
   howto = elf_howto_table + ELF32_R_TYPE (rel->r_info);
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
+    (_("%B(%A+%#Lx): invalid instruction for TLS relocation %s"),
      input_bfd,
      input_section,
-     (long) rel->r_offset,
+     rel->r_offset,
      howto->name);
   bfd_set_error (bfd_error_bad_value);
 }
@@ -3369,10 +3369,10 @@ elf_s390_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          (long) rel->r_offset,
+          rel->r_offset,
           howto->name,
           h->root.root.string);
 
@@ -3426,9 +3426,9 @@ elf_s390_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                (long) rel->r_offset, name, (int) r);
+                rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index 3dfe80684ed8d496587597eceed6167fd95a27f3..5fc10b35d2f94d503e42a57e0bd6ed54565867fd 100644 (file)
@@ -2880,8 +2880,8 @@ s3_bfd_score_elf_check_relocs (bfd *abfd,
             {
              _bfd_error_handler
                /* xgettext:c-format */
-                (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
-                 abfd, (unsigned long) rel->r_offset);
+                (_("%B: CALL15 reloc at %#Lx not against global symbol"),
+                 abfd, rel->r_offset);
               bfd_set_error (bfd_error_bad_value);
               return FALSE;
             }
index 66e7945d00402302bf9f760dd2a91af2dc8470ed..5554cccbb5b9d6a0607a7e16d8f92e7cf5dea1f9 100644 (file)
@@ -2685,8 +2685,8 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
             {
              _bfd_error_handler
                /* xgettext:c-format */
-                (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
-                 abfd, (unsigned long) rel->r_offset);
+                (_("%B: CALL15 reloc at %#Lx not against global symbol"),
+                 abfd, rel->r_offset);
               bfd_set_error (bfd_error_bad_value);
               return FALSE;
             }
index 3df13b5a1aac84c6ac7968104cbe6dd21368e88e..dfc16a275a9c83dead9a1b558d32aca375b8674f 100644 (file)
@@ -577,8 +577,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
       if (laddr >= sec->size)
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%B: 0x%lx: warning: bad R_SH_USES offset"),
-                             abfd, (unsigned long) irel->r_offset);
+         _bfd_error_handler (_("%B: %#Lx: warning: bad R_SH_USES offset"),
+                             abfd, irel->r_offset);
          continue;
        }
       insn = bfd_get_16 (abfd, contents + laddr);
@@ -589,8 +589,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
-            abfd, (unsigned long) irel->r_offset, insn);
+           (_("%B: %#Lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
+            abfd, irel->r_offset, insn);
          continue;
        }
 
@@ -607,8 +607,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: 0x%lx: warning: bad R_SH_USES load offset"),
-            abfd, (unsigned long) irel->r_offset);
+           (_("%B: %#Lx: warning: bad R_SH_USES load offset"),
+            abfd, irel->r_offset);
          continue;
        }
 
@@ -623,8 +623,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: 0x%lx: warning: could not find expected reloc"),
-            abfd, (unsigned long) paddr);
+           (_("%B: %#Lx: warning: could not find expected reloc"),
+            abfd, paddr);
          continue;
        }
 
@@ -652,8 +652,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: warning: symbol in unexpected section"),
-                abfd, (unsigned long) paddr);
+               (_("%B: %#Lx: warning: symbol in unexpected section"),
+                abfd, paddr);
              continue;
            }
 
@@ -782,8 +782,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: 0x%lx: warning: could not find expected COUNT reloc"),
-            abfd, (unsigned long) paddr);
+           (_("%B: %#Lx: warning: could not find expected COUNT reloc"),
+            abfd, paddr);
          continue;
        }
 
@@ -792,8 +792,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
       if (irelcount->r_addend == 0)
        {
          /* xgettext:c-format */
-         _bfd_error_handler (_("%B: 0x%lx: warning: bad count"),
-                             abfd, (unsigned long) paddr);
+         _bfd_error_handler (_("%B: %#Lx: warning: bad count"),
+                             abfd, paddr);
          continue;
        }
 
@@ -1196,8 +1196,8 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
-                abfd, (unsigned long) irel->r_offset);
+               (_("%B: %#Lx: fatal: reloc overflow while relaxing"),
+                abfd, irel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -1567,8 +1567,8 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: fatal: reloc overflow while relaxing"),
-                abfd, (unsigned long) irel->r_offset);
+               (_("%B: %#Lx: fatal: reloc overflow while relaxing"),
+                abfd, irel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4006,9 +4006,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+                   (_("%B(%A+%#Lx): %s relocation against SEC_MERGE section"),
                     input_bfd, input_section,
-                    (long) rel->r_offset, howto->name);
+                    rel->r_offset, howto->name);
                  return FALSE;
                }
 
@@ -4124,10 +4124,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+                   (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
                     input_bfd,
                     input_section,
-                    (long) rel->r_offset,
+                    rel->r_offset,
                     howto->name,
                     h->root.root.string);
                  return FALSE;
@@ -4203,9 +4203,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"),
+                   (_("%B: %#Lx: fatal: unaligned branch target for relax-support relocation"),
                     input_section->owner,
-                    (unsigned long) rel->r_offset);
+                    rel->r_offset);
                  bfd_set_error (bfd_error_bad_value);
                  return FALSE;
                }
@@ -4237,10 +4237,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+               (_("%B: %#Lx: fatal: unaligned %s relocation %#Lx"),
                 input_section->owner,
-                (unsigned long) rel->r_offset, howto->name,
-                (unsigned long) relocation);
+                rel->r_offset, howto->name,
+                relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4253,10 +4253,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+               (_("%B: %#Lx: fatal: unaligned %s relocation %#Lx"),
                 input_section->owner,
-                (unsigned long) rel->r_offset, howto->name,
-                (unsigned long) relocation);
+                rel->r_offset, howto->name,
+                relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4268,10 +4268,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"),
+               (_("%B: %#Lx: fatal: R_SH_PSHA relocation %Ld not in range -32..32"),
                 input_section->owner,
-                (unsigned long) rel->r_offset,
-                (unsigned long) relocation);
+                rel->r_offset,
+                relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4283,10 +4283,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"),
+               (_("%B: %#Lx: fatal: R_SH_PSHL relocation %Ld not in range -32..32"),
                 input_section->owner,
-                (unsigned long) rel->r_offset,
-                (unsigned long) relocation);
+                rel->r_offset,
+                relocation);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -4428,10 +4428,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"),
+                     (_("%B(%A+%#Lx): cannot emit fixup to `%s' in read-only section"),
                       input_bfd,
                       input_section,
-                      (long) rel->r_offset,
+                      rel->r_offset,
                       symname);
                    return FALSE;
                  }
@@ -4900,10 +4900,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B(%A+0x%lx): cannot emit fixup to `%s' in read-only section"),
+                     (_("%B(%A+%#Lx): cannot emit fixup to `%s' in read-only section"),
                       input_bfd,
                       input_section,
-                      (long) rel->r_offset,
+                      rel->r_offset,
                       symname);
                    return FALSE;
                  }
@@ -5002,8 +5002,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): %s relocation against external symbol \"%s\""),
-                input_bfd, input_section, (long) rel->r_offset, howto->name,
+               (_("%B(%A+%#Lx): %s relocation against external symbol \"%s\""),
+                input_bfd, input_section, rel->r_offset, howto->name,
                 h->root.root.string);
              return FALSE;
            }
index de7ce95d0349d8941453ef9bead2483b175a542f..87033f77f65f4f9c6cecac1092d330c85de647aa 100644 (file)
@@ -597,9 +597,9 @@ shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: error: unaligned relocation type %d at %08x reloc %p\n"),
-        input_section->owner, ELF32_R_TYPE (rel->r_info),
-        (unsigned) rel->r_offset, relocation);
+       (_("%B: error: unaligned relocation type %d at %#Lx reloc %#Lx"),
+        input_section->owner, (int) ELF32_R_TYPE (rel->r_info),
+        rel->r_offset, *relocation);
       return FALSE;
     }
 
index cbb026e7fe7f066bd61fe1eb6eea6ab7320a04c1..f7c18d9470b1525375466c93bb1430da8d0eb183 100644 (file)
@@ -5040,10 +5040,10 @@ spu_elf_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%s+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             bfd_get_section_name (input_bfd, input_section),
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             sym_name);
          ret = FALSE;
index e2a29618cd07c2c52e5e0750ba47818e97544cc8..bcce8003709444add6408ff4f86440db436fe43b 100644 (file)
@@ -2632,7 +2632,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
              if (h == NULL)
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%B, section %A: relocation %s with non-zero addend %d"
+                 (_("%B, section %A: relocation %s with non-zero addend %Ld"
                     " against local symbol"),
                   input_bfd,
                   input_section,
@@ -2641,7 +2641,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
              else
                _bfd_error_handler
                  /* xgettext:c-format */
-                 (_("%B, section %A: relocation %s with non-zero addend %d"
+                 (_("%B, section %A: relocation %s with non-zero addend %Ld"
                     " against symbol `%s'"),
                   input_bfd,
                   input_section,
@@ -2801,7 +2801,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       Elf_Internal_Sym *isym;
 
index d333203ec5d1f0685b8f4b3651943d505810e337..976ce300757097c4ebf1e6abcaf546f49466fb85 100644 (file)
@@ -1478,7 +1478,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       int tls_type;
 
@@ -3566,10 +3566,10 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          (long) rel->r_offset,
+          rel->r_offset,
           howto->name,
           h->root.root.string);
 
index 8db75078003d438cfd76fdf4e0da6231d52c191d..a9c56cbfa551250ac99e21ffb6e2894de5d0ac92 100644 (file)
@@ -3602,9 +3602,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
+                   (_("%B: %#Lx: warning: R_V850_LONGCALL points to "
                       "unrecognized insns"),
-                    abfd, (unsigned long) irel->r_offset);
+                    abfd, irel->r_offset);
                  continue;
                }
 
@@ -3612,10 +3612,10 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
-                      "unrecognized insn 0x%x"),
+                   (_("%B: %#Lx: warning: R_V850_LONGCALL points to "
+                      "unrecognized insn %#x"),
                     abfd,
-                    (unsigned long) irel->r_offset + no_match,
+                    irel->r_offset + no_match,
                     insn[no_match]);
                  continue;
                }
@@ -3657,9 +3657,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
+                   (_("%B: %#Lx: warning: R_V850_LONGCALL points to "
                       "unrecognized reloc"),
-                    abfd, (unsigned long) irel->r_offset);
+                    abfd, irel->r_offset);
 
                  continue;
                }
@@ -3697,9 +3697,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGCALL points to "
-                      "unrecognized reloc 0x%lx"),
-                    abfd, (unsigned long) irel->r_offset,
+                   (_("%B: %#Lx: warning: R_V850_LONGCALL points to "
+                      "unrecognized reloc %#Lx"),
+                    abfd, irel->r_offset,
                     irelcall->r_offset);
                  continue;
                }
@@ -3840,9 +3840,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
+                   (_("%B: %#Lx: warning: R_V850_LONGJUMP points to "
                       "unrecognized insns"),
-                    abfd, (unsigned long) irel->r_offset);
+                    abfd, irel->r_offset);
                  continue;
                }
 
@@ -3850,10 +3850,10 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
-                      "unrecognized insn 0x%x"),
+                   (_("%B: %#Lx: warning: R_V850_LONGJUMP points to "
+                      "unrecognized insn %#x"),
                     abfd,
-                    (unsigned long) irel->r_offset + no_match,
+                    irel->r_offset + no_match,
                     insn[no_match]);
                  continue;
                }
@@ -3884,9 +3884,9 @@ v850_elf_relax_section (bfd *abfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: 0x%lx: warning: R_V850_LONGJUMP points to "
+                   (_("%B: %#Lx: warning: R_V850_LONGJUMP points to "
                       "unrecognized reloc"),
-                    abfd, (unsigned long) irel->r_offset);
+                    abfd, irel->r_offset);
                  continue;
                }
 
index 367e41559e980cfdbd4284c3aec17954aa31cb5a..368de9cf7f671ee5371e64f030e9dd6c9dd2276e 100644 (file)
@@ -632,8 +632,8 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
                  if (eh->got_addend != (bfd_vma) rel->r_addend)
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B: warning: GOT addend of %ld to `%s' does"
-                        " not match previous GOT addend of %ld"),
+                     (_("%B: warning: GOT addend of %Ld to `%s' does"
+                        " not match previous GOT addend of %Ld"),
                         abfd, rel->r_addend, h->root.root.string,
                         eh->got_addend);
 
@@ -1508,7 +1508,7 @@ elf_vax_relocate_section (bfd *output_bfd,
          else if (rel->r_addend != 0)
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B: warning: PLT addend of %d to `%s'"
+             (_("%B: warning: PLT addend of %Ld to `%s'"
                 " from %A section ignored"),
               input_bfd, rel->r_addend, h->root.root.string, input_section);
          rel->r_addend = 0;
@@ -1640,7 +1640,7 @@ elf_vax_relocate_section (bfd *output_bfd,
                  else
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B: warning: %s relocation to 0x%x from %A section"),
+                     (_("%B: warning: %s relocation to %#Lx from %A section"),
                      input_bfd, howto->name, outrel.r_addend,
                      input_section);
                }
index 64e40d3ef2b122c2090945b991a3784f1e875216..b3ddbf1e243bcd783e337328dc9a64cd8b140a8d 100644 (file)
@@ -1001,7 +1001,7 @@ elf_xtensa_check_relocs (bfd *abfd,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned r_symndx;
       struct elf_link_hash_entry *h = NULL;
       struct elf_xtensa_link_hash_entry *eh;
       int tls_type, old_tls_type;
@@ -2787,7 +2787,7 @@ elf_xtensa_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): relocation offset out of range (size=0x%x)"),
+           (_("%B(%A+%#Lx): relocation offset out of range (size=%#Lx)"),
             input_bfd, input_section, rel->r_offset, input_size);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -2813,12 +2813,12 @@ elf_xtensa_relocate_section (bfd *output_bfd,
          _bfd_error_handler
            ((sym_type == STT_TLS
              /* xgettext:c-format */
-             ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+             ? _("%B(%A+%#Lx): %s used with TLS symbol %s")
              /* xgettext:c-format */
-             : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
+             : _("%B(%A+%#Lx): %s used with non-TLS symbol %s")),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             name);
        }
@@ -3071,10 +3071,10 @@ elf_xtensa_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             name);
          return FALSE;
@@ -6549,7 +6549,8 @@ extend_ebb_bounds_forward (ebb_t *ebb)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"),
+           (_("%B(%A+%#Lx): could not decode instruction; "
+              "possible configuration mismatch"),
             ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len);
          return FALSE;
        }
@@ -6626,7 +6627,8 @@ extend_ebb_bounds_backward (ebb_t *ebb)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"),
+           (_("%B(%A+%#Lx): could not decode instruction; "
+              "possible configuration mismatch"),
             ebb->sec->owner, ebb->sec, ebb->end_offset + insn_block_len);
          return FALSE;
        }
@@ -7740,7 +7742,9 @@ compute_text_actions (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY relocation; possible configuration mismatch"),
+           (_("%B(%A+%#Lx): could not decode instruction for "
+              "XTENSA_ASM_SIMPLIFY relocation; "
+              "possible configuration mismatch"),
             sec->owner, sec, r_offset);
          continue;
        }
@@ -7999,7 +8003,8 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table)
  decode_error:
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"),
+    (_("%B(%A+%#Lx): could not decode instruction; "
+       "possible configuration mismatch"),
      ebb->sec->owner, ebb->sec, offset);
   return FALSE;
 }
@@ -10776,7 +10781,7 @@ do_fix_for_relocatable_link (Elf_Internal_Rela *rel,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unexpected fix for %s relocation"),
+           (_("%B(%A+%#Lx): unexpected fix for %s relocation"),
             input_bfd, input_section, rel->r_offset,
             elf_howto_table[r_type].name);
          return FALSE;
index ada26f5255751aae762ae80eafd58dde5f760f37..3e88787c179bea52dbfe32509c3ca279d1c6bd2d 100644 (file)
@@ -3081,9 +3081,8 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval,
       reloc_howto_type *howto = elf64_alpha_howto_table + r_type;
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: %A+0x%lx: warning: %s relocation against unexpected insn"),
-        info->abfd, info->sec,
-        (unsigned long) irel->r_offset, howto->name);
+       (_("%B: %A+%#Lx: warning: %s relocation against unexpected insn"),
+        info->abfd, info->sec, irel->r_offset, howto->name);
       return TRUE;
     }
 
@@ -3277,9 +3276,8 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: %A+0x%lx: warning: LITERAL relocation against unexpected insn"),
-        abfd, info->sec,
-        (unsigned long) irel->r_offset);
+       (_("%B: %A+%#Lx: warning: LITERAL relocation against unexpected insn"),
+        abfd, info->sec, irel->r_offset);
       return TRUE;
     }
 
index 834855ab596d0f80627a9991a75b1fcd76e6a358..9fefe0eb39c53b2df42d5678a3632900633a88c1 100644 (file)
@@ -2079,8 +2079,8 @@ elf64_hppa_finish_dynamic_symbol (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("stub entry for %s cannot load .plt, dp offset = %ld"),
-            hh->eh.root.root.string, (long) value);
+           (_("stub entry for %s cannot load .plt, dp offset = %Ld"),
+            hh->eh.root.root.string, value);
          return FALSE;
        }
 
@@ -3284,7 +3284,7 @@ elf_hppa_final_link_relocate (Elf_Internal_Rela *rel,
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B(%A+0x%" BFD_VMA_FMT "x): cannot reach %s"),
+             (_("%B(%A+%#Lx): cannot reach %s"),
              input_bfd,
              input_section,
              offset,
index 4dff255e42613424a8b30daccb2551e3951eebb0..8140dc5f3ad6fee2e6da91d498e1bfc8b258a0fd 100644 (file)
@@ -584,9 +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'."
+               (_("%B: Can't relax br at %#Lx in section `%A'."
                   " Please use brl or indirect branch."),
-                sec->owner, (unsigned long) roff, sec);
+                sec->owner, roff, sec);
              bfd_set_error (bfd_error_bad_value);
              goto error_return;
            }
@@ -3279,8 +3279,8 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
 overflow:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: short data segment overflowed (0x%lx >= 0x400000)"),
-            abfd, (unsigned long) (max_short_vma - min_short_vma));
+           (_("%B: short data segment overflowed (%#Lx >= 0x400000)"),
+            abfd, max_short_vma - min_short_vma);
          return FALSE;
        }
       else if ((gp_val > min_short_vma
@@ -3948,7 +3948,7 @@ elf64_ia64_relocate_section (bfd *output_bfd,
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("%B: missing TLS section for relocation %s against `%s'"
-                    " at 0x%lx in section `%A'."),
+                    " at %#Lx in section `%A'."),
                   input_bfd, howto->name, name,
                   rel->r_offset, input_section);
                break;
@@ -3964,8 +3964,8 @@ 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)."),
+                     (_("%B: Can't relax br (%s) to `%s' at %#Lx in section"
+                        " `%A' with size %#Lx (> 0x1000000)."),
                       input_bfd, howto->name, name, rel->r_offset,
                       input_section, input_section->size);
                    break;
@@ -5159,9 +5159,8 @@ error_free_dyn:
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("Warning: size of symbol `%s' changed"
-                    " from %lu in %B to %lu in %B"),
-                  name, (unsigned long) h->size, old_bfd,
-                  (unsigned long) isym->st_size, abfd);
+                    " from %Lu in %B to %Lu in %B"),
+                  name, h->size, old_bfd, isym->st_size, abfd);
 
              h->size = isym->st_size;
            }
index b4ff5a337c4d9e3614634cd784db3e798aed0816..8c8e06dff52693b70ef418aa6f8abbc8dea2c262 100644 (file)
@@ -1193,12 +1193,10 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto,
            _bfd_error_handler
              /* xgettext:c-format */
              (_("%B: Internal inconsistency error for value for\n\
- linker-allocated global register: linked: 0x%lx%08lx != relaxed: 0x%lx%08lx\n"),
+ linker-allocated global register: linked: %#Lx != relaxed: %#Lx"),
               isec->owner,
-              (unsigned long) (value >> 32), (unsigned long) value,
-              (unsigned long) (gregdata->reloc_request[bpo_index].value
-                               >> 32),
-              (unsigned long) gregdata->reloc_request[bpo_index].value);
+              value,
+              gregdata->reloc_request[bpo_index].value);
            bfd_set_error (bfd_error_bad_value);
            return bfd_reloc_overflow;
          }
@@ -1740,9 +1738,9 @@ mmix_final_link_relocate (reloc_howto_type *howto, asection *input_section,
            /* FIXME: Better error message.  */
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B: LOCAL directive: Register $%ld is not a local register."
-                "  First global register is $%ld."),
-              input_section->owner, (long) srel, (long) first_global);
+             (_("%B: LOCAL directive: Register $%Ld is not a local register."
+                "  First global register is $%Ld."),
+              input_section->owner, srel, first_global);
 
            return bfd_reloc_overflow;
          }
@@ -2444,10 +2442,10 @@ _bfd_mmix_after_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("Internal inconsistency: remaining %u != max %u.\n\
+       (_("Internal inconsistency: remaining %lu != max %lu.\n\
   Please report this bug."),
-        gregdata->n_remaining_bpo_relocs_this_relaxation_round,
-        gregdata->n_bpo_relocs);
+        (unsigned long) gregdata->n_remaining_bpo_relocs_this_relaxation_round,
+        (unsigned long) gregdata->n_bpo_relocs);
       return FALSE;
     }
 
index f85f8cd7489ffb98ff05a90cd75370b455b445bf..62e3cca06c1d8846aa43fc238d6290b17fcae5e1 100644 (file)
@@ -863,7 +863,7 @@ elf_s390_check_relocs (bfd *abfd,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       Elf_Internal_Sym *isym;
 
@@ -2254,10 +2254,10 @@ invalid_tls_insn (bfd *input_bfd,
   howto = elf_howto_table + ELF64_R_TYPE (rel->r_info);
   _bfd_error_handler
     /* xgettext:c-format */
-    (_("%B(%A+0x%lx): invalid instruction for TLS relocation %s"),
+    (_("%B(%A+%#Lx): invalid instruction for TLS relocation %s"),
      input_bfd,
      input_section,
-     (long) rel->r_offset,
+     rel->r_offset,
      howto->name);
   bfd_set_error (bfd_error_bad_value);
 }
@@ -3293,10 +3293,10 @@ elf_s390_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          (long) rel->r_offset,
+          rel->r_offset,
           howto->name,
           h->root.root.string);
 
@@ -3350,9 +3350,9 @@ elf_s390_relocate_section (bfd *output_bfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                (long) rel->r_offset, name, (int) r);
+                rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index bc8e9e1af99f971c94741cecf2a20a55146deaba..1cffb2ec5649f8c71646b6760a24d9f43897ca13 100644 (file)
@@ -1536,9 +1536,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B(%A+0x%lx): %s relocation against SEC_MERGE section"),
+                   (_("%B(%A+%#Lx): %s relocation against SEC_MERGE section"),
                     input_bfd, input_section,
-                    (long) rel->r_offset, howto->name);
+                    rel->r_offset, howto->name);
                  return FALSE;
                }
 
@@ -1633,10 +1633,10 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+                   (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
                     input_bfd,
                     input_section,
-                    (long) rel->r_offset,
+                    rel->r_offset,
                     howto->name,
                     h->root.root.string);
                }
@@ -1677,9 +1677,9 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: error: unaligned relocation type %d at %08x reloc %08x\n"),
-            input_bfd, (int) r_type, (unsigned) rel->r_offset,
-            (unsigned) relocation);
+           (_("%B: error: unaligned relocation type %d at %08Lx reloc %08Lx"),
+            input_bfd, (int) r_type, rel->r_offset,
+            relocation);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
index 3e0772d5d585306584ed938a1d781c76cf32a2c9..a7ad2bcd92acd65aec511d2dcb87652d59652604 100644 (file)
@@ -724,8 +724,8 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
           error = TRUE;
          _bfd_error_handler
            /* xgettext:c-format */
-            (_("%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
-             ibfd, (long) new_flags, (long) old_flags);
+            (_("%B: uses different e_flags (%#x) fields than previous modules (%#x)"),
+             ibfd, new_flags, old_flags);
         }
 
       elf_elfheader (obfd)->e_flags = old_flags;
index 8cef9f5e742b2a4bf379f679385e1e3e0537eca5..f93cfd215856bb41ef302fc5ca883dea37368ed7 100644 (file)
@@ -1885,10 +1885,9 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd,
 
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: TLS transition from %s to %s against `%s' at 0x%lx "
+       (_("%B: TLS transition from %s to %s against `%s' at %#Lx "
           "in section `%A' failed"),
-        abfd, from->name, to->name, name,
-        (unsigned long) rel->r_offset, sec);
+        abfd, from->name, to->name, name, rel->r_offset, sec);
       bfd_set_error (bfd_error_bad_value);
       return FALSE;
     }
@@ -2428,7 +2427,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       struct elf_x86_64_link_hash_entry *eh;
       Elf_Internal_Sym *isym;
@@ -4574,7 +4573,7 @@ do_ifunc_pointer:
                  _bfd_error_handler
                    /* xgettext:c-format */
                    (_("%B: relocation %s against STT_GNU_IFUNC "
-                      "symbol `%s' has non-zero addend: %d"),
+                      "symbol `%s' has non-zero addend: %Ld"),
                     input_bfd, howto->name, name, rel->r_addend);
                  bfd_set_error (bfd_error_bad_value);
                  return FALSE;
@@ -5116,22 +5115,13 @@ direct:
                          else
                            name = bfd_elf_sym_name (input_bfd, symtab_hdr,
                                                     sym, NULL);
-                         if (addend < 0)
-                           _bfd_error_handler
-                             /* xgettext:c-format */
-                             (_("%B: addend -0x%x in relocation %s against "
-                                "symbol `%s' at 0x%lx in section `%A' is "
-                                "out of range"),
-                              input_bfd, addend, howto->name, name,
-                              (unsigned long) rel->r_offset, input_section);
-                         else
-                           _bfd_error_handler
-                             /* xgettext:c-format */
-                             (_("%B: addend 0x%x in relocation %s against "
-                                "symbol `%s' at 0x%lx in section `%A' is "
-                                "out of range"),
-                              input_bfd, addend, howto->name, name,
-                              (unsigned long) rel->r_offset, input_section);
+                         _bfd_error_handler
+                           /* xgettext:c-format */
+                           (_("%B: addend %s%#x in relocation %s against "
+                              "symbol `%s' at %#Lx in section `%A' is "
+                              "out of range"),
+                            input_bfd, addend < 0 ? "-" : "", addend,
+                            howto->name, name, rel->r_offset, input_section);
                          bfd_set_error (bfd_error_bad_value);
                          return FALSE;
                        }
@@ -5750,10 +5740,10 @@ direct:
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             h->root.root.string);
          return FALSE;
@@ -5790,9 +5780,9 @@ check_relocation_error:
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B(%A+0x%lx): reloc against `%s': error %d"),
+               (_("%B(%A+%#Lx): reloc against `%s': error %d"),
                 input_bfd, input_section,
-                (long) rel->r_offset, name, (int) r);
+                rel->r_offset, name, (int) r);
              return FALSE;
            }
        }
index cbc534fe0066aa7381ee660f121397ae66694004..6114b11e66fa5522ae2e0bbd20662391b6ca8712 100644 (file)
@@ -1190,9 +1190,9 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: version count (%ld) does not match symbol count (%ld)"),
+           (_("%B: version count (%Ld) does not match symbol count (%ld)"),
             abfd,
-            (long) (verhdr->sh_size / sizeof (Elf_External_Versym)),
+            verhdr->sh_size / sizeof (Elf_External_Versym),
             symcount);
 
          /* Slurp in the symbols without the version information,
index d871bc1d355d36c71b3c6fef7aa6371c4e910559..b1b60eca3c17f4f0949c96d2a4541ac25cd9b658 100644 (file)
@@ -297,9 +297,9 @@ elf_core_file_p (bfd *abfd)
          {
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("Warning: %B is truncated: expected core file "
-                "size >= %lu, found: %lu."),
-              abfd, (unsigned long) high, (unsigned long) statbuf.st_size);
+             (_("warning: %B is truncated: expected core file "
+                "size >= %Lu, found: %llu"),
+              abfd, high, (unsigned long long) statbuf.st_size);
          }
       }
   }
index bb1a30a8c5a9aa0d0fe470638507805637a22e1c..6010b616bc82672ab9dd8c5df8cfa5745cf00b26 100644 (file)
@@ -2394,9 +2394,9 @@ elf_link_read_relocs_from_section (bfd *abfd,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: bad reloc symbol index (%#lx >= %#lx)"
+               (_("%B: bad reloc symbol index (%#Lx >= %#lx)"
                   " for offset %#Lx in section `%A'"),
-                abfd, (unsigned long) r_symndx, (unsigned long) nsyms,
+                abfd, r_symndx, (unsigned long) nsyms,
                 irela->r_offset, sec);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
@@ -2406,10 +2406,10 @@ elf_link_read_relocs_from_section (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: non-zero symbol index (%#lx)"
+           (_("%B: non-zero symbol index (%#Lx)"
               " for offset %#Lx in section `%A'"
               " when the object file has no symbol table"),
-            abfd, (unsigned long) r_symndx, (unsigned long) nsyms,
+            abfd, r_symndx,
             irela->r_offset, sec);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -8616,8 +8616,7 @@ elf_link_adjust_relocs (bfd *abfd,
                              abfd, sec,
                              (*rel_hash)->root.root.string);
          _bfd_error_handler (_("%B:%A: error: try relinking with --gc-keep-exported enabled."),
-                             abfd, sec,
-                             (*rel_hash)->root.root.string);
+                             abfd, sec);
          bfd_set_error (bfd_error_invalid_operation);
          return FALSE;
        }
index 86bae0eaa8eb1462013f3c58e2a6ddffd43dceab..b28e8d8295cf4c6dc53e5489aefbe9e4454f703b 100644 (file)
@@ -5016,7 +5016,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto,
              _bfd_error_handler
                /* xgettext:c-format */
                (_("%B: relocation %s against STT_GNU_IFUNC "
-                  "symbol `%s' has non-zero addend: %d"),
+                  "symbol `%s' has non-zero addend: %Ld"),
                 input_bfd, howto->name, name, rel->r_addend);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
@@ -6162,11 +6162,11 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
          _bfd_error_handler
            ((sym_type == STT_TLS
              /* xgettext:c-format */
-             ? _("%B(%A+0x%lx): %s used with TLS symbol %s")
+             ? _("%B(%A+%#Lx): %s used with TLS symbol %s")
              /* xgettext:c-format */
-             : _("%B(%A+0x%lx): %s used with non-TLS symbol %s")),
+             : _("%B(%A+%#Lx): %s used with non-TLS symbol %s")),
             input_bfd,
-            input_section, (long) rel->r_offset, howto->name, name);
+            input_section, rel->r_offset, howto->name, name);
        }
 
       /* We relax only if we can see that there can be a valid transition
@@ -6434,8 +6434,8 @@ elfNN_aarch64_relocate_section (bfd *output_bfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
-            input_bfd, input_section, (long) rel->r_offset, howto->name,
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
+            input_bfd, input_section, rel->r_offset, howto->name,
             h->root.root.string);
          return FALSE;
        }
@@ -7101,7 +7101,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < rel_end; rel++)
     {
       struct elf_link_hash_entry *h;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       unsigned int r_type;
       bfd_reloc_code_real_type bfd_r_type;
       Elf_Internal_Sym *isym;
index 7f90c9325f4c9948374b7e8dcbc376a2abf196f1..2e70db6dc898b27a0b433b054293a1430966981a 100644 (file)
@@ -617,9 +617,9 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: Can't relax br at 0x%lx in section `%A'."
+               (_("%B: Can't relax br at %#Lx in section `%A'."
                   " Please use brl or indirect branch."),
-                sec->owner, (unsigned long) roff, sec);
+                sec->owner, roff, sec);
              bfd_set_error (bfd_error_bad_value);
              goto error_return;
            }
@@ -3685,8 +3685,8 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final)
 overflow:
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: short data segment overflowed (0x%lx >= 0x400000)"),
-            abfd, (unsigned long) (max_short_vma - min_short_vma));
+           (_("%B: short data segment overflowed (%#Lx >= 0x400000)"),
+            abfd, max_short_vma - min_short_vma);
          return FALSE;
        }
       else if ((gp_val > min_short_vma
@@ -4473,7 +4473,7 @@ missing_tls_sec:
                _bfd_error_handler
                  /* xgettext:c-format */
                  (_("%B: missing TLS section for relocation %s against `%s'"
-                    " at 0x%lx in section `%A'."),
+                    " at %#Lx in section `%A'."),
                   input_bfd, howto->name, name,
                   rel->r_offset, input_section);
                break;
@@ -4489,8 +4489,8 @@ missing_tls_sec:
                       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)."),
+                     (_("%B: Can't relax br (%s) to `%s' at %#Lx"
+                        " in section `%A' with size %#Lx (> 0x1000000)."),
                       input_bfd, howto->name, name, rel->r_offset,
                       input_section, input_section->size);
                    break;
index 6d297cea7d73ca6ceb02d559c4a73bb5d3041780..973f471e05293ceffb0e7bf11d5439c9e8aa5d1f 100644 (file)
@@ -515,7 +515,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < relocs + sec->reloc_count; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
 
       r_symndx = ELFNN_R_SYM (rel->r_info);
@@ -2233,10 +2233,10 @@ riscv_elf_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        {
          (*_bfd_error_handler)
-           (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+           (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
             input_bfd,
             input_section,
-            (long) rel->r_offset,
+            rel->r_offset,
             howto->name,
             h->root.root.string);
          continue;
index 2eb3dd3363cc03755b664f4b436e4e69be016b69..f270cdb3688269227c7ef82efd096722122cce63 100644 (file)
@@ -8456,8 +8456,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: GOT reloc at 0x%lx not expected in executables"),
-                abfd, (unsigned long) rel->r_offset);
+               (_("%B: GOT reloc at %#Lx not expected in executables"),
+                abfd, rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -8594,8 +8594,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: CALL16 reloc at 0x%lx not against global symbol"),
-                abfd, (unsigned long) rel->r_offset);
+               (_("%B: CALL16 reloc at %#Lx not against global symbol"),
+                abfd, rel->r_offset);
              bfd_set_error (bfd_error_bad_value);
              return FALSE;
            }
@@ -10137,7 +10137,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                      _bfd_error_handler
                        /* xgettext:c-format */
                        (_("%B: Can't find matching LO16 reloc against `%s'"
-                          " for %s at 0x%lx in section `%A'"),
+                          " for %s at %#Lx in section `%A'"),
                         input_bfd, name,
                         howto->name, rel->r_offset, input_section);
                    }
@@ -10680,11 +10680,11 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd,
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: `%A' offset of %ld from `%A' "
+                   (_("%B: `%A' offset of %Ld from `%A' "
                       "beyond the range of ADDIUPC"),
                     output_bfd,
                     htab->root.sgotplt->output_section,
-                    (long) gotpc_offset,
+                    gotpc_offset,
                     htab->root.splt->output_section);
                  bfd_set_error (bfd_error_no_error);
                  return FALSE;
@@ -11248,10 +11248,10 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B: `%A' offset of %ld from `%A' beyond the range of ADDIUPC"),
+           (_("%B: `%A' offset of %Ld from `%A' beyond the range of ADDIUPC"),
             output_bfd,
             htab->root.sgotplt->output_section,
-            (long) gotpc_offset,
+            gotpc_offset,
             htab->root.splt->output_section);
          bfd_set_error (bfd_error_no_error);
          return FALSE;
@@ -15124,10 +15124,9 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info)
     {
       /* xgettext:c-format */
       _bfd_error_handler
-       (_("%B: uses different e_flags (0x%lx) fields than previous modules "
-          "(0x%lx)"),
-        ibfd, (unsigned long) new_flags,
-        (unsigned long) old_flags);
+       (_("%B: uses different e_flags (%#x) fields than previous modules "
+          "(%#x)"),
+        ibfd, new_flags, old_flags);
       ok = FALSE;
     }
 
@@ -15427,7 +15426,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
        _bfd_error_handler
          (_("%B: warning: Unexpected flag in the flags2 field of "
             ".MIPS.abiflags (0x%lx)"), ibfd,
-          (unsigned long) in_abiflags.flags2);
+          in_abiflags.flags2);
     }
   else
     {
index b50d34bb5f2c684c395663af121c1f281f066b4a..ef6e50c63fbbbb043f220447c3363225e8627816 100644 (file)
@@ -1426,7 +1426,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       struct _bfd_sparc_elf_link_hash_entry *eh;
       Elf_Internal_Sym *isym;
@@ -4083,10 +4083,10 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          (long) rel->r_offset,
+          rel->r_offset,
           howto->name,
           h->root.root.string);
 
index ec88ab31a66865d9164a27a3b9e800a338ce8a86..50543b9bac55c836a4864581585969953ace6fd5 100644 (file)
@@ -1695,7 +1695,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
   for (rel = relocs; rel < rel_end; rel++)
     {
       unsigned int r_type;
-      unsigned long r_symndx;
+      unsigned int r_symndx;
       struct elf_link_hash_entry *h;
       int tls_type;
 
@@ -3973,10 +3973,10 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                      rel->r_offset) != (bfd_vma) -1)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+         (_("%B(%A+%#Lx): unresolvable %s relocation against symbol `%s'"),
           input_bfd,
           input_section,
-          (long) rel->r_offset,
+          rel->r_offset,
           howto->name,
           h->root.root.string);
 
index 958a40be0c49b7e4b923809e6c60342100bc6cfa..9dce4a8cb309e3bf59b01f40d7e70b2940e89053 100644 (file)
@@ -156,7 +156,7 @@ ieee_write_id (bfd *abfd, const char *id)
     {
       _bfd_error_handler
        /* xgettext:c-format */
-       (_("%B: string too long (%d chars, max 65535)"), abfd, length);
+       (_("%B: string too long (%ld chars, max 65535)"), abfd, (long) length);
       bfd_set_error (bfd_error_invalid_operation);
       return FALSE;
     }
@@ -224,7 +224,7 @@ read_id (common_header_type *ieee)
   if (ieee->input_p + length >= ieee->end_p)
     {
       _bfd_error_handler (_("IEEE parser: string length: %#lx longer than buffer: %#lx"),
-                         length, (long) (ieee->end_p - ieee->input_p));
+                         (long) length, (long) (ieee->end_p - ieee->input_p));
       bfd_set_error (bfd_error_invalid_operation);
       return NULL;
     }
@@ -859,8 +859,8 @@ ieee_slurp_external_symbols (bfd *abfd)
                  {
                    _bfd_error_handler
                      /* xgettext:c-format */
-                     (_("%B: unexpected ATN type %d in external part"),
-                        abfd, (int) value);
+                     (_("%B: unexpected ATN type %Ld in external part"),
+                        abfd, value);
                    bfd_set_error (bfd_error_bad_value);
                    return FALSE;
                  }
index a0c704a1c0a380e28390345f440c6229c5dd2a8c..5ec8ce723d349c563564530e6a474527b690a974 100644 (file)
@@ -825,13 +825,10 @@ ihex_write_object_contents (bfd *abfd)
                  extbase = where & 0xffff0000;
                  if (where > extbase + 0xffff)
                    {
-                     char buf[20];
-
-                     sprintf_vma (buf, where);
                      _bfd_error_handler
                        /* xgettext:c-format */
-                       (_("%B: address 0x%s out of range for Intel Hex file"),
-                        abfd, buf);
+                       (_("%B: address %#Lx out of range for Intel Hex file"),
+                        abfd, where);
                      bfd_set_error (bfd_error_bad_value);
                      return FALSE;
                    }
index 2c1973c2a42bdea0f1b33ac450332138ea70df56..be2fb17d332ec2bdacf900e56d88776830afebaf 100644 (file)
@@ -2528,8 +2528,8 @@ bfd_mach_o_write_contents (bfd *abfd)
        break;
       default:
        _bfd_error_handler
-         (_("unable to allocate data for load command 0x%lx"),
-          (unsigned long) cmd->type);
+         (_("unable to allocate data for load command %#x"),
+          cmd->type);
        break;
       }
 
@@ -2633,8 +2633,8 @@ bfd_mach_o_write_contents (bfd *abfd)
          break;
        default:
          _bfd_error_handler
-           (_("unable to write unknown load command 0x%lx"),
-            (unsigned long) cmd->type);
+           (_("unable to write unknown load command %#x"),
+            cmd->type);
          return FALSE;
        }
     }
@@ -2817,8 +2817,8 @@ bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg)
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("section address (%lx) below start of segment (%lx)"),
-              (unsigned long) s->addr, (unsigned long) vma);
+           (_("section address (%#Lx) below start of segment (%#Lx)"),
+              s->addr, vma);
          return FALSE;
        }
 
@@ -2958,8 +2958,8 @@ bfd_mach_o_layout_commands (bfd_mach_o_data_struct *mdata)
          break;
        default:
          _bfd_error_handler
-           (_("unable to layout unknown load command 0x%lx"),
-            (unsigned long) cmd->type);
+           (_("unable to layout unknown load command %#x"),
+            cmd->type);
          ret = FALSE;
          break;
        }
@@ -3494,7 +3494,7 @@ bfd_mach_o_read_section_32 (bfd *abfd, unsigned long prot)
   if (section->align > 64)
     {
       _bfd_error_handler
-       (_("bfd_mach_o_read_section_32: overlarge alignment value: 0x%x, "
+       (_("bfd_mach_o_read_section_32: overlarge alignment value: %#lx, "
           "using 32 instead"), section->align);
       section->align = 32;
     }
@@ -3537,7 +3537,7 @@ bfd_mach_o_read_section_64 (bfd *abfd, unsigned long prot)
   if (section->align > 64)
     {
       _bfd_error_handler
-       (_("bfd_mach_o_read_section_64: overlarge alignment value: 0x%x, "
+       (_("bfd_mach_o_read_section_64: overlarge alignment value: %#lx, "
           "using 32 instead"), section->align);
       section->align = 32;
     }
@@ -3588,8 +3588,8 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-        (_("bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %lu"),
-         symwidth, (unsigned long) symoff);
+        (_("bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %u"),
+         symwidth, symoff);
       return FALSE;
     }
 
@@ -3607,9 +3607,9 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd,
     {
       _bfd_error_handler
        /* xgettext:c-format */
-        (_("bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %lu)"),
-         (unsigned long) stroff,
-         (unsigned long) sym->strsize);
+        (_("bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %u)"),
+         stroff,
+         sym->strsize);
       return FALSE;
     }
 
@@ -4756,8 +4756,8 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command)
       break;
     default:
       command->len = 0;
-      _bfd_error_handler (_("%B: unknown load command 0x%lx"),
-                         abfd, (unsigned long) command->type);
+      _bfd_error_handler (_("%B: unknown load command %#x"),
+                         abfd, command->type);
       return FALSE;
     }
 
@@ -5052,8 +5052,8 @@ bfd_mach_o_header_p (bfd *abfd,
   if (! (header.byteorder == BFD_ENDIAN_BIG
         || header.byteorder == BFD_ENDIAN_LITTLE))
     {
-      _bfd_error_handler (_("unknown header byte-order value 0x%lx"),
-                         (unsigned long) header.byteorder);
+      _bfd_error_handler (_("unknown header byte-order value %#x"),
+                         header.byteorder);
       goto wrong;
     }
 
index 553de8eae5e2faaf869501e94caf4a033ecc663b..a1792a8741bd1d1082ff522ba5d744ff2daded04 100644 (file)
@@ -861,8 +861,8 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec,
       if (offset > sec->rawsize)
        _bfd_error_handler
          /* xgettext:c-format */
-         (_("%B: access beyond end of merged section (%ld)"),
-          sec->owner, (long) offset);
+         (_("%B: access beyond end of merged section (%Ld)"),
+          sec->owner, offset);
       return secinfo->first_str ? sec->size : 0;
     }
 
index 99a591bc74963892d492b21c21c47eb44c66c54c..03995e8be031e9331155381b978b47b3ec0e8876 100644 (file)
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -956,8 +956,8 @@ mmo_write_loc_chunk (bfd *abfd, bfd_vma vma, const bfd_byte *loc,
          _bfd_error_handler
            /* xgettext:c-format */
            (_("%B: attempt to emit contents at non-multiple-of-4"
-              " address 0x%lx\n"),
-            abfd, (unsigned long) vma);
+              " address %#Lx"),
+            abfd, vma);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -1602,7 +1602,7 @@ mmo_scan (bfd *abfd)
   bfd_size_type nbytes_read = 0;
   /* Buffer with room to read a 64-bit value.  */
   bfd_byte buf[8];
-  long stab_loc = -1;
+  file_ptr stab_loc = -1;
   char *file_names[256];
 
   abfd->symcount = 0;
@@ -2033,7 +2033,7 @@ mmo_scan (bfd *abfd)
                         " not equal to the number of tetras to the preceding"
                         " lop_stab (%ld)\n"),
                       abfd, (long) (y * 256 + z),
-                      (curpos - stab_loc - 4)/4);
+                      (long) (curpos - stab_loc - 4)/4);
                    bfd_set_error (bfd_error_bad_value);
                    goto error_return;
                  }
@@ -3239,15 +3239,14 @@ mmo_write_object_contents (bfd *abfd)
               global registers.  */
            _bfd_error_handler
              /* xgettext:c-format */
-             (_("%B: too many initialized registers; section length %ld\n"),
-              abfd, (long) sec->size);
+             (_("%B: too many initialized registers; section length %Ld"),
+              abfd, sec->size);
          else
            _bfd_error_handler
              /* xgettext:c-format */
              (_("%B: invalid start address for initialized registers of"
-                " length %ld: 0x%lx%08lx\n"),
-              abfd, (long) sec->size,
-              (unsigned long) (sec->vma >> 32), (unsigned long) (sec->vma));
+                " length %Ld: %#Lx"),
+              abfd, sec->size, sec->vma);
 
          return FALSE;
        }
index a18e0b26792ccba6dc245f5d78f8718bdc31684a..d24c5f88bc3bb44bc69f652c54df9679c344e862 100644 (file)
@@ -529,7 +529,7 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
       {
        /* xgettext:c-format */
        _bfd_error_handler
-         (_("%B: aout header specifies an invalid number of data-directory entries: %d"),
+         (_("%B: aout header specifies an invalid number of data-directory entries: %ld"),
           abfd, a->NumberOfRvaAndSizes);
        bfd_set_error (bfd_error_bad_value);
 
@@ -2985,7 +2985,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
              > bfd_get_section_size (section))
            {
              /* xgettext:c-format */
-             _bfd_error_handler (_("%B: Data Directory size (%lx) exceeds space left in section (%lx)"),
+             _bfd_error_handler (_("%B: Data Directory size (%lx) exceeds space left in section (%Lx)"),
                                  obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size,
                                  bfd_get_section_size (section) - (addr - section->vma));
              return FALSE;
index 3139bf5c35a74d61078851ac67d6fb5533152f5f..5a3686f4f0c232edc89a404cc184362d79e1d729 100644 (file)
@@ -276,7 +276,7 @@ _bfd_link_section_stabs (bfd *abfd,
        {
          _bfd_error_handler
            /* xgettext:c-format */
-           (_("%B(%A+0x%lx): Stabs entry has invalid string index."),
+           (_("%B(%A+%#lx): Stabs entry has invalid string index."),
             abfd, stabsec, (long) (sym - stabbuf));
          bfd_set_error (bfd_error_bad_value);
          goto error_return;
index 8121c7e2ef279be8362ea84cf3fe91124135b795..d80e98d4a1510334aea2a68605c95344439c0b09 100644 (file)
@@ -1499,7 +1499,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
            {
              _bfd_error_handler
                /* xgettext:c-format */
-               (_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"),
+               (_("%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %Ld"),
                 abfd, name, sym.n_sclass, sym.n_scnum,
                 aux.x_csect.x_scnlen.l);
              bfd_set_error (bfd_error_bad_value);
@@ -1529,7 +1529,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %d"),
+                   (_("%B: XMC_TC0 symbol `%s' is class %d scnlen %Ld"),
                     abfd, name, sym.n_sclass, aux.x_csect.x_scnlen.l);
                  bfd_set_error (bfd_error_bad_value);
                  goto error_return;
@@ -2105,7 +2105,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
                {
                  _bfd_error_handler
                    /* xgettext:c-format */
-                   (_("%B: reloc %s:%d not in csect"),
+                   (_("%B: reloc %s:%Ld not in csect"),
                     abfd, o->name, i);
                  bfd_set_error (bfd_error_bad_value);
                  goto error_return;
@@ -5112,9 +5112,9 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo)
       if (best_address > toc_start + 0x8000)
        {
          _bfd_error_handler
-           (_("TOC overflow: 0x%lx > 0x10000; try -mminimal-toc "
+           (_("TOC overflow: %#Lx > 0x10000; try -mminimal-toc "
               "when compiling"),
-            (unsigned long) (toc_end - toc_start));
+            toc_end - toc_start);
          bfd_set_error (bfd_error_file_too_big);
          return FALSE;
        }
index 90bbed7a2be5ecedc898e8898c34ca849d98a063..340e73224b98c3d57ef4bfc90f04f8c1c36de5f8 100644 (file)
@@ -1,3 +1,8 @@
+2017-07-12  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-arc/nps-1b.err: Update.
+       * testsuite/ld-x86-64/ilp32-11.d: Update.
+
 2017-07-11  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/ld-selective/selective.exp: Support single digit
index a7d299681d398789dc77de5332c4b8be16ea544d..4b13145fbf3ead8d9b578dd37d1e052df4a89631 100644 (file)
@@ -1,2 +1,2 @@
-.*\.o\(\.text\+0x0\): CMEM relocation to `foo' is invalid, 16 MSB should be 0x57f0 \(value is 0x56f03000\)
+.*\.o\(\.text\+0\): CMEM relocation to `foo' is invalid, 16 MSB should be 0x57f0 \(value is 0x56f03000\)
 #...
index f6fc86c3f82725bc2c938b60ec5bd406b4b1f24b..bc6c8a836ac15919a220ec8502ddcae600242dd7 100644 (file)
@@ -1,3 +1,3 @@
 #as: --x32
 #ld: -shared -melf32_x86_64
-#error: .*addend 0x7fffffff in relocation R_X86_64_64 against symbol `func' at 0x0 in section `.data.rel.local' is out of range
+#error: .*addend 0x7fffffff in relocation R_X86_64_64 against symbol `func' at 0 in section `.data.rel.local' is out of range
This page took 0.106372 seconds and 4 git commands to generate.