]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd_size_type to size_t
authorAlan Modra <amodra@gmail.com>
Wed, 19 Feb 2020 02:42:00 +0000 (13:12 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 19 Feb 2020 02:42:00 +0000 (13:12 +1030)
bfd_size_type was invented a long time ago in the K&R days.  Many
places in binutils ought to be using size_t instead (and there are
lots of places that use long or unsigned long that really ought to use
size_t too).  Note that you can't change everything over to size_t: A
32-bit host needs a larger type than size_t to support reading and
processing of 64-bit ELF object files.  This patch just tidies some
of the more obvious uses of bfd_size_type that could be size_t.  There
no doubt are more lurking in the source.  Incidentally, practically
all functions used for output of object files can use size_t and don't
need to worry about overflow of size expressions.  If you have
something like
  symcount * sizeof (void *)
when symcount is counting symbols already in memory then you know that
this expression can't overflow since the size of a symbol in memory is
larger by far than that of a pointer.

* aix386-core.c (aix386_core_file_p): Use size_t for "amt".
* aout-target.h (object_p): Likewise.
* aout-tic30.c (tic30_aout_object_p): Likewise.
* aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
(emit_stringtab, write_syms, link_hash_table_create),
(aout_link_write_other_symbol): Likewise.
* archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
(bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
(_bfd_compute_and_write_armap): Likewise.
* archures.c (bfd_arch_list): Likewise.
* bfd.c (bfd_record_phdr): Likewise.
* binary.c (binary_canonicalize_symtab): Likewise.
* cisco-core.c (cisco_core_file_validate): Likewise.
* coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
(find_arm_glue, record_arm_to_thumb_glue),
(record_thumb_to_arm_glue): Likewise.
* coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
(ppc_allocate_toc_section): Likewise.
* coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
* coff-sh.c (sh_relax_section): Likewise.
* coff64-rs6000.c (xcoff64_archive_p): Likewise.
* coffcode.h (handle_COMDAT, coff_new_section_hook),
(coff_set_alignment_hook, coff_mkobject),
(coff_compute_section_file_positions): Likewise.
* coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
(coff_find_nearest_line_with_names),
( bfd_coff_set_symbol_class): Likewise.
* cofflink.c (_bfd_coff_link_hash_table_create),
(_bfd_coff_link_input_bfd): Likewise.
* dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
* dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
(build_line_info_table, sort_line_sequences),
(line_info_add_include_dir, line_info_add_file_name),
(decode_line_info, scan_unit_for_symbols, parse_comp_unit),
(place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
* ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
(_bfd_ecoff_find_nearest_line),
(_bfd_ecoff_bfd_link_hash_table_create): Likewise.
* ecofflink.c (bfd_ecoff_debug_init): Likewise.
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
* elf-m10300.c (mn10300_elf_relax_section),
(elf32_mn10300_link_hash_table_create): Likewise.
* elf-strtab.c (_bfd_elf_strtab_init): Likewise.
* elf.c (make_mapping, copy_elf_program_header): Likewise.
* elf32-arm.c (elf32_arm_link_hash_table_create),
(elf32_arm_setup_section_lists, elf32_arm_check_relocs),
(elf32_arm_new_section_hook): Likewise.
* elf32-avr.c (elf_avr_new_section_hook),
(elf32_avr_link_hash_table_create, get_local_syms),
(elf32_avr_setup_section_lists): Likewise.
* elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
(bfin_link_hash_table_create): Likewise.
* elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
* elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
* elf32-csky.c (csky_elf_link_hash_table_create),
(csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
* elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
* elf32-hppa.c (elf32_hppa_link_hash_table_create),
(elf32_hppa_setup_section_lists, get_local_syms): Likewise.
* elf32-i386.c (elf_i386_check_relocs): Likewise.
* elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
* elf32-m32r.c (m32r_elf_link_hash_table_create),
(m32r_elf_check_relocs): Likewise.
* elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
(elf32_m68hc11_setup_section_lists),
(elf32_m68hc11_size_stubs): Likewise.
* elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
* elf32-metag.c (elf_metag_link_hash_table_create),
(elf_metag_setup_section_lists): Likewise.
* elf32-microblaze.c (microblaze_elf_link_hash_table_create),
(microblaze_elf_check_relocs): Likewise.
* elf32-nds32.c (nds32_elf_link_hash_table_create),
(nds32_elf_check_relocs): Likewise.
* elf32-nios2.c (nios2_elf32_setup_section_lists),
(get_local_syms, nios2_elf32_check_relocs),
(nios2_elf32_link_hash_table_create): Likewise.
* elf32-or1k.c (or1k_elf_link_hash_table_create),
(or1k_elf_check_relocs): Likewise.
* elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
* elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
* elf32-s390.c (elf_s390_link_hash_table_create),
(elf_s390_check_relocs): Likewise.
* elf32-score.c (score_elf_create_got_section),
(s3_elf32_score_new_section_hook),
(elf32_score_link_hash_table_create): Likewise.
* elf32-score7.c (score_elf_create_got_section),
(s7_elf32_score_new_section_hook): Likewise.
* elf32-sh.c (sh_elf_link_hash_table_create),
(sh_elf_check_relocs): Likewise.
* elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
(elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
* elf32-tilepro.c (tilepro_elf_link_hash_table_create),
(tilepro_elf_check_relocs): Likewise.
* elf32-v850.c (remember_hi16s_reloc): Likewise.
* elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
* elf32-xtensa.c (elf_xtensa_link_hash_table_create),
(elf_xtensa_new_section_hook): Likewise.
* elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
(get_got_entry, elf64_alpha_check_relocs): Likewise.
* elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
* elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
* elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
* elf64-ppc.c (ppc64_elf_new_section_hook),
(ppc64_elf_link_hash_table_create, update_local_sym_info),
(update_plt_info, ppc64_elf_check_relocs): Likewise.
* elf64-s390.c (elf_s390_link_hash_table_create),
(elf_s390_check_relocs): Likewise.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
* elflink.c (bfd_elf_link_record_local_dynamic_symbol),
(_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
(elf_link_add_archive_symbols, compute_bucket_count),
(bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
(bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
(bfd_elf_final_link): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
(elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
(elfNN_aarch64_new_section_hook): Likewise.
* elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
* elfnn-riscv.c (riscv_elf_link_hash_table_create),
(riscv_elf_check_relocs): Likewise.
* elfxx-mips.c (_bfd_mips_elf_new_section_hook),
(_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
(_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
(_bfd_mips_elf_link_hash_table_create): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
(_bfd_sparc_elf_check_relocs),
(_bfd_sparc_elf_new_section_hook): Likewise.
* elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
(tilegx_elf_check_relocs): Likewise.
* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
* format.c (bfd_check_format_matches): Likewise.
* hash.c (_bfd_stringtab_init): Likewise.
* ihex.c (ihex_scan): Likewise.
* irix-core.c (irix_core_core_file_p): Likewise.
* linker.c (bfd_wrapped_link_hash_lookup),
(_bfd_generic_link_hash_table_create),
(_bfd_generic_reloc_link_order): Likewise.
* lynx-core.c (lynx_core_file_p): Likewise.
* netbsd-core.c (netbsd_core_file_p): Likewise.
* osf-core.c (osf_core_core_file_p): Likewise.
* pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
(link_hash_table_create, aout_link_write_other_symbol): Likewise.
* peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
* peicode.h (pe_mkobject): Likewise.
* ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
* ptrace-core.c (ptrace_unix_core_file_p): Likewise.
* sco5-core.c (read_uarea): Likewise.
* som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
(som_write_fixups, som_write_space_strings, som_write_symbol_strings),
(som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
(som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
(bfd_som_attach_aux_hdr, som_write_armap): Likewise.
* srec.c (srec_scan): Likewise.
* syms.c (_bfd_generic_make_empty_symbol): Likewise.
* targets.c (bfd_target_list): Likewise.
* tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
* trad-core.c (trad_unix_core_file_p): Likewise.
* vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
(vms_new_section_hook): Likewise.
* wasm-module.c (wasm_make_empty_symbol): Likewise.
* xcofflink.c (xcoff_get_section_contents),
(_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
(xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
(bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.

93 files changed:
bfd/ChangeLog
bfd/aix386-core.c
bfd/aout-target.h
bfd/aout-tic30.c
bfd/aoutx.h
bfd/archive.c
bfd/archures.c
bfd/bfd.c
bfd/binary.c
bfd/cisco-core.c
bfd/coff-arm.c
bfd/coff-ppc.c
bfd/coff-rs6000.c
bfd/coff-sh.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/coffgen.c
bfd/cofflink.c
bfd/dwarf1.c
bfd/dwarf2.c
bfd/ecoff.c
bfd/ecofflink.c
bfd/elf-hppa.h
bfd/elf-m10300.c
bfd/elf-strtab.c
bfd/elf.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-bfin.c
bfd/elf32-cr16.c
bfd/elf32-cris.c
bfd/elf32-csky.c
bfd/elf32-frv.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-lm32.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68k.c
bfd/elf32-metag.c
bfd/elf32-microblaze.c
bfd/elf32-nds32.c
bfd/elf32-nios2.c
bfd/elf32-or1k.c
bfd/elf32-ppc.c
bfd/elf32-pru.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.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-ppc.c
bfd/elf64-s390.c
bfd/elf64-x86-64.c
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/elfxx-x86.c
bfd/format.c
bfd/hash.c
bfd/ihex.c
bfd/irix-core.c
bfd/linker.c
bfd/lynx-core.c
bfd/netbsd-core.c
bfd/osf-core.c
bfd/pdp11.c
bfd/peXXigen.c
bfd/peicode.h
bfd/ppcboot.c
bfd/ptrace-core.c
bfd/sco5-core.c
bfd/som.c
bfd/srec.c
bfd/syms.c
bfd/targets.c
bfd/tekhex.c
bfd/trad-core.c
bfd/vms-alpha.c
bfd/wasm-module.c
bfd/xcofflink.c

index 9e3190d0bd770e0920173d15500655f0f4544148..4b2d8249b119967a739e07e2ce34e88f4bd14349 100644 (file)
@@ -1,3 +1,170 @@
+2020-02-19  Alan Modra  <amodra@gmail.com>
+
+       * aix386-core.c (aix386_core_file_p): Use size_t for "amt".
+       * aout-target.h (object_p): Likewise.
+       * aout-tic30.c (tic30_aout_object_p): Likewise.
+       * aoutx.h (some_aout_object_p, mkobject, make_empty_symbol),
+       (emit_stringtab, write_syms, link_hash_table_create),
+       (aout_link_write_other_symbol): Likewise.
+       * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p),
+       (bfd_ar_hdr_from_filesystem, _bfd_write_archive_contents),
+       (_bfd_compute_and_write_armap): Likewise.
+       * archures.c (bfd_arch_list): Likewise.
+       * bfd.c (bfd_record_phdr): Likewise.
+       * binary.c (binary_canonicalize_symtab): Likewise.
+       * cisco-core.c (cisco_core_file_validate): Likewise.
+       * coff-arm.c (coff_arm_link_hash_table_create, find_thumb_glue),
+       (find_arm_glue, record_arm_to_thumb_glue),
+       (record_thumb_to_arm_glue): Likewise.
+       * coff-ppc.c (ppc_coff_link_hash_table_create, record_toc),
+       (ppc_allocate_toc_section): Likewise.
+       * coff-rs6000.c (_bfd_xcoff_mkobject, _bfd_xcoff_archive_p): Likewise.
+       * coff-sh.c (sh_relax_section): Likewise.
+       * coff64-rs6000.c (xcoff64_archive_p): Likewise.
+       * coffcode.h (handle_COMDAT, coff_new_section_hook),
+       (coff_set_alignment_hook, coff_mkobject),
+       (coff_compute_section_file_positions): Likewise.
+       * coffgen.c (coff_make_empty_symbol, coff_bfd_make_debug_symbol),
+       (coff_find_nearest_line_with_names),
+       ( bfd_coff_set_symbol_class): Likewise.
+       * cofflink.c (_bfd_coff_link_hash_table_create),
+       (_bfd_coff_link_input_bfd): Likewise.
+       * dwarf1.c (alloc_dwarf1_unit, alloc_dwarf1_func): Likewise.
+       * dwarf2.c (read_abbrevs, read_attribute_value, add_line_info),
+       (build_line_info_table, sort_line_sequences),
+       (line_info_add_include_dir, line_info_add_file_name),
+       (decode_line_info, scan_unit_for_symbols, parse_comp_unit),
+       (place_sections, _bfd_dwarf2_slurp_debug_info): Likewise.
+       * ecoff.c (_bfd_ecoff_mkobject, _bfd_ecoff_make_empty_symbol),
+       (_bfd_ecoff_find_nearest_line),
+       (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
+       * ecofflink.c (bfd_ecoff_debug_init): Likewise.
+       * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Likewise.
+       * elf-m10300.c (mn10300_elf_relax_section),
+       (elf32_mn10300_link_hash_table_create): Likewise.
+       * elf-strtab.c (_bfd_elf_strtab_init): Likewise.
+       * elf.c (make_mapping, copy_elf_program_header): Likewise.
+       * elf32-arm.c (elf32_arm_link_hash_table_create),
+       (elf32_arm_setup_section_lists, elf32_arm_check_relocs),
+       (elf32_arm_new_section_hook): Likewise.
+       * elf32-avr.c (elf_avr_new_section_hook),
+       (elf32_avr_link_hash_table_create, get_local_syms),
+       (elf32_avr_setup_section_lists): Likewise.
+       * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create),
+       (bfin_link_hash_table_create): Likewise.
+       * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
+       * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
+       * elf32-csky.c (csky_elf_link_hash_table_create),
+       (csky_elf_check_relocs, elf32_csky_setup_section_lists): Likewise.
+       * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
+       * elf32-hppa.c (elf32_hppa_link_hash_table_create),
+       (elf32_hppa_setup_section_lists, get_local_syms): Likewise.
+       * elf32-i386.c (elf_i386_check_relocs): Likewise.
+       * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
+       * elf32-m32r.c (m32r_elf_link_hash_table_create),
+       (m32r_elf_check_relocs): Likewise.
+       * elf32-m68hc1x.c (m68hc11_elf_hash_table_create),
+       (elf32_m68hc11_setup_section_lists),
+       (elf32_m68hc11_size_stubs): Likewise.
+       * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
+       * elf32-metag.c (elf_metag_link_hash_table_create),
+       (elf_metag_setup_section_lists): Likewise.
+       * elf32-microblaze.c (microblaze_elf_link_hash_table_create),
+       (microblaze_elf_check_relocs): Likewise.
+       * elf32-nds32.c (nds32_elf_link_hash_table_create),
+       (nds32_elf_check_relocs): Likewise.
+       * elf32-nios2.c (nios2_elf32_setup_section_lists),
+       (get_local_syms, nios2_elf32_check_relocs),
+       (nios2_elf32_link_hash_table_create): Likewise.
+       * elf32-or1k.c (or1k_elf_link_hash_table_create),
+       (or1k_elf_check_relocs): Likewise.
+       * elf32-ppc.c (ppc_elf_modify_segment_map, update_plt_info): Likewise.
+       * elf32-pru.c (pru_elf32_link_hash_table_create): Likewise.
+       * elf32-s390.c (elf_s390_link_hash_table_create),
+       (elf_s390_check_relocs): Likewise.
+       * elf32-score.c (score_elf_create_got_section),
+       (s3_elf32_score_new_section_hook),
+       (elf32_score_link_hash_table_create): Likewise.
+       * elf32-score7.c (score_elf_create_got_section),
+       (s7_elf32_score_new_section_hook): Likewise.
+       * elf32-sh.c (sh_elf_link_hash_table_create),
+       (sh_elf_check_relocs): Likewise.
+       * elf32-tic6x.c (elf32_tic6x_link_hash_table_create),
+       (elf32_tic6x_new_section_hook, elf32_tic6x_check_relocs): Likewise.
+       * elf32-tilepro.c (tilepro_elf_link_hash_table_create),
+       (tilepro_elf_check_relocs): Likewise.
+       * elf32-v850.c (remember_hi16s_reloc): Likewise.
+       * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
+       * elf32-xtensa.c (elf_xtensa_link_hash_table_create),
+       (elf_xtensa_new_section_hook): Likewise.
+       * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create),
+       (get_got_entry, elf64_alpha_check_relocs): Likewise.
+       * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
+       * elf64-ia64-vms.c (elf64_ia64_object_p): Likewise.
+       * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
+       * elf64-ppc.c (ppc64_elf_new_section_hook),
+       (ppc64_elf_link_hash_table_create, update_local_sym_info),
+       (update_plt_info, ppc64_elf_check_relocs): Likewise.
+       * elf64-s390.c (elf_s390_link_hash_table_create),
+       (elf_s390_check_relocs): Likewise.
+       * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+       * elflink.c (bfd_elf_link_record_local_dynamic_symbol),
+       (_bfd_elf_link_find_version_dependencies, elf_link_add_object_symbols),
+       (elf_link_add_archive_symbols, compute_bucket_count),
+       (bfd_elf_size_dynsym_hash_dynstr, _bfd_elf_link_hash_table_create),
+       (bfd_elf_get_bfd_needed_list, elf_link_swap_symbols_out),
+       (bfd_elf_final_link): Likewise.
+       * elfnn-aarch64.c (elfNN_aarch64_link_hash_table_create),
+       (elfNN_aarch64_setup_section_lists, elfNN_aarch64_check_relocs),
+       (elfNN_aarch64_new_section_hook): Likewise.
+       * elfnn-ia64.c (elfNN_ia64_object_p): Likewise.
+       * elfnn-riscv.c (riscv_elf_link_hash_table_create),
+       (riscv_elf_check_relocs): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_new_section_hook),
+       (_bfd_mips_elf_add_symbol_hook, _bfd_mips_elf_check_relocs),
+       (_bfd_mips_elf_modify_segment_map, _bfd_mips_elf_set_section_contents),
+       (_bfd_mips_elf_link_hash_table_create): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create),
+       (_bfd_sparc_elf_check_relocs),
+       (_bfd_sparc_elf_new_section_hook): Likewise.
+       * elfxx-tilegx.c (tilegx_elf_link_hash_table_create),
+       (tilegx_elf_check_relocs): Likewise.
+       * elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Likewise.
+       * format.c (bfd_check_format_matches): Likewise.
+       * hash.c (_bfd_stringtab_init): Likewise.
+       * ihex.c (ihex_scan): Likewise.
+       * irix-core.c (irix_core_core_file_p): Likewise.
+       * linker.c (bfd_wrapped_link_hash_lookup),
+       (_bfd_generic_link_hash_table_create),
+       (_bfd_generic_reloc_link_order): Likewise.
+       * lynx-core.c (lynx_core_file_p): Likewise.
+       * netbsd-core.c (netbsd_core_file_p): Likewise.
+       * osf-core.c (osf_core_core_file_p): Likewise.
+       * pdp11.c (some_aout_object_p, mkobject, make_empty_symbol),
+       (link_hash_table_create, aout_link_write_other_symbol): Likewise.
+       * peXXigen.c (_bfd_XX_bfd_copy_private_section_data): Likewise.
+       * peicode.h (pe_mkobject): Likewise.
+       * ppcboot.c (ppcboot_mkobject, ppcboot_canonicalize_symtab): Likewise.
+       * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
+       * sco5-core.c (read_uarea): Likewise.
+       * som.c (hppa_som_gen_reloc_type, som_object_p, som_prep_headers),
+       (som_write_fixups, som_write_space_strings, som_write_symbol_strings),
+       (som_finish_writing, som_canonicalize_symtab, som_new_section_hook),
+       (som_bfd_copy_private_section_data, bfd_som_set_section_attributes),
+       (bfd_som_attach_aux_hdr, som_write_armap): Likewise.
+       * srec.c (srec_scan): Likewise.
+       * syms.c (_bfd_generic_make_empty_symbol): Likewise.
+       * targets.c (bfd_target_list): Likewise.
+       * tekhex.c (first_phase, tekhex_sizeof_headers): Likewise.
+       * trad-core.c (trad_unix_core_file_p): Likewise.
+       * vms-alpha.c (vms_initialize, alpha_vms_bfd_link_hash_table_create),
+       (vms_new_section_hook): Likewise.
+       * wasm-module.c (wasm_make_empty_symbol): Likewise.
+       * xcofflink.c (xcoff_get_section_contents),
+       (_bfd_xcoff_bfd_link_hash_table_create, xcoff_set_import_path),
+       (xcoff_find_function, bfd_xcoff_link_record_set, xcoff_build_ldsym),
+       (bfd_xcoff_size_dynamic_sections, xcoff_link_input_bfd): Likewise.
+
 2020-02-19  Alan Modra  <amodra@gmail.com>
 
        * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
index 1883d9843bb1d57ac46672ee5f3608e6cbd7824f..c9ec756c4a19cd1fd03777342a9a643dd97dda96 100644 (file)
@@ -71,7 +71,7 @@ aix386_core_file_p (bfd *abfd)
   int i, n;
   unsigned char longbuf[4];    /* Raw bytes of various header fields */
   bfd_size_type core_size = sizeof (struct corehdr);
-  bfd_size_type amt;
+  size_t amt;
   struct corehdr *core;
   struct mergem
   {
index bf74df7b80c3098f5e320be47a9ae14d8a86c2eb..00024e6be284208ccddf51cea0c27bca461943bc 100644 (file)
@@ -134,7 +134,7 @@ MY (object_p) (bfd *abfd)
   struct external_exec exec_bytes;     /* Raw exec header from file.  */
   struct internal_exec exec;           /* Cleaned-up exec header.  */
   const bfd_target *target;
-  bfd_size_type amt = EXEC_BYTES_SIZE;
+  size_t amt = EXEC_BYTES_SIZE;
 
   if (bfd_bread ((void *) &exec_bytes, amt, abfd) != amt)
     {
index ab89bb5490228858fc3d81e1c5de22c888eddd60..06f401cc7e5effbd93406a4c4d0b8651c05b9564 100644 (file)
@@ -553,7 +553,7 @@ tic30_aout_object_p (bfd *abfd)
   struct external_exec exec_bytes;     /* Raw exec header from file.  */
   struct internal_exec exec;           /* Cleaned-up exec header.  */
   const bfd_target *target;
-  bfd_size_type amt = EXEC_BYTES_SIZE;
+  size_t amt = EXEC_BYTES_SIZE;
 
   if (bfd_bread (& exec_bytes, amt, abfd) != amt)
     {
index fa3a9746b6e9e666ea9894f00183a6f88aed5441..df04ab2644966398d8834d7c7c0b687ca8a092fe 100644 (file)
@@ -459,7 +459,7 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
 {
   struct aout_data_struct *rawptr, *oldrawptr;
   const bfd_target *result;
-  bfd_size_type amt = sizeof (* rawptr);
+  size_t amt = sizeof (* rawptr);
 
   rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt);
   if (rawptr == NULL)
@@ -671,7 +671,7 @@ bfd_boolean
 NAME (aout, mkobject) (bfd *abfd)
 {
   struct aout_data_struct *rawptr;
-  bfd_size_type amt = sizeof (* rawptr);
+  size_t amt = sizeof (* rawptr);
 
   bfd_set_error (bfd_error_system_call);
 
@@ -1675,7 +1675,7 @@ translate_to_native_sym_flags (bfd *abfd,
 asymbol *
 NAME (aout, make_empty_symbol) (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (aout_symbol_type);
+  size_t amt = sizeof (aout_symbol_type);
 
   aout_symbol_type *new_symbol = (aout_symbol_type *) bfd_zalloc (abfd, amt);
   if (!new_symbol)
@@ -1852,7 +1852,7 @@ static bfd_boolean
 emit_stringtab (bfd *abfd, struct bfd_strtab_hash *tab)
 {
   bfd_byte buffer[BYTES_IN_WORD];
-  bfd_size_type amt = BYTES_IN_WORD;
+  size_t amt = BYTES_IN_WORD;
 
   /* The string table starts with the size.  */
   PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
@@ -1878,7 +1878,7 @@ NAME (aout, write_syms) (bfd *abfd)
       asymbol *g = generic[count];
       bfd_size_type indx;
       struct external_nlist nsp;
-      bfd_size_type amt;
+      size_t amt;
 
       indx = add_to_stringtab (abfd, strtab, g->name, FALSE);
       if (indx == (bfd_size_type) -1)
@@ -2980,7 +2980,7 @@ struct bfd_link_hash_table *
 NAME (aout, link_hash_table_create) (bfd *abfd)
 {
   struct aout_link_hash_table *ret;
-  bfd_size_type amt = sizeof (* ret);
+  size_t amt = sizeof (* ret);
 
   ret = (struct aout_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
@@ -3634,7 +3634,7 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data)
   bfd_vma val;
   struct external_nlist outsym;
   bfd_size_type indx;
-  bfd_size_type amt;
+  size_t amt;
 
   if (h->root.type == bfd_link_hash_warning)
     {
@@ -3759,7 +3759,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo,
   struct reloc_std_external srel;
   struct reloc_ext_external erel;
   void * rel_ptr;
-  bfd_size_type amt;
+  size_t amt;
 
   pr = p->u.reloc.p;
 
index 3d5635a9f248a00fd89033cb89e45cfdbc8dedb1..67d1c9e1534b9794435e2c6e4e6e47568c2f3c45 100644 (file)
@@ -212,7 +212,7 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size)
 bfd_boolean
 _bfd_generic_mkarchive (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (struct artdata);
+  size_t amt = sizeof (struct artdata);
 
   abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
   if (bfd_ardata (abfd) == NULL)
@@ -847,7 +847,7 @@ bfd_generic_archive_p (bfd *abfd)
 {
   struct artdata *tdata_hold;
   char armag[SARMAG + 1];
-  bfd_size_type amt;
+  size_t amt;
 
   if (bfd_bread (armag, SARMAG, abfd) != SARMAG)
     {
@@ -1837,7 +1837,7 @@ bfd_ar_hdr_from_filesystem (bfd *abfd, const char *filename, bfd *member)
   struct stat status;
   struct areltdata *ared;
   struct ar_hdr *hdr;
-  bfd_size_type amt;
+  size_t amt;
 
   if (member && (member->flags & BFD_IN_MEMORY) != 0)
     {
@@ -2187,7 +2187,7 @@ _bfd_write_archive_contents (bfd *arch)
 
       while (remaining)
        {
-         unsigned int amt = DEFAULT_BUFFERSIZE;
+         size_t amt = DEFAULT_BUFFERSIZE;
 
          if (amt > remaining)
            amt = remaining;
@@ -2251,7 +2251,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
   asymbol **syms = NULL;
   long syms_max = 0;
   bfd_boolean ret;
-  bfd_size_type amt;
+  size_t amt;
   static bfd_boolean report_plugin_err = TRUE;
 
   /* Dunno if this is the best place for this info...  */
index 885b027e434d3cd7980efedfe1e60459fbbb3d80..1544b7b483377849f29c8c6935f9c6d25f401220 100644 (file)
@@ -853,7 +853,7 @@ bfd_arch_list (void)
   const char **name_ptr;
   const char **name_list;
   const bfd_arch_info_type * const *app;
-  bfd_size_type amt;
+  size_t amt;
 
   /* Determine the number of architectures.  */
   vec_length = 0;
index b1050626b68194e60c55b6780bb1244873e94083..574cebd8de2531e4aebe3fd76e2264463eed1113 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2169,7 +2169,7 @@ bfd_record_phdr (bfd *abfd,
                 asection **secs)
 {
   struct elf_segment_map *m, **pm;
-  bfd_size_type amt;
+  size_t amt;
 
   if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
     return TRUE;
index 3e4b0d91cfc5110beb9f9fb963f75db76d200d57..0683e414d6eb1c8008a7171f59d2396a87a03439 100644 (file)
@@ -151,7 +151,7 @@ binary_canonicalize_symtab (bfd *abfd, asymbol **alocation)
   asection *sec = (asection *) abfd->tdata.any;
   asymbol *syms;
   unsigned int i;
-  bfd_size_type amt = BIN_SYMS * sizeof (asymbol);
+  size_t amt = BIN_SYMS * sizeof (asymbol);
 
   syms = (asymbol *) bfd_alloc (abfd, amt);
   if (syms == NULL)
index 0a5bc4a213b495a7426b0a918fab08199df426e2..da18d2edbff385fb19d7fd9395af837cdd2c7682 100644 (file)
@@ -92,7 +92,7 @@ cisco_core_file_validate (bfd *abfd, int crash_info_loc)
   unsigned int rambase;
   sec_ptr asect;
   struct stat statbuf;
-  bfd_size_type amt;
+  size_t amt;
   flagword flags;
 
   if (bfd_seek (abfd, (file_ptr) crash_info_loc, SEEK_SET) != 0)
index c2623d2f294c63c884f4a64ec7dbcd4eb478ebb6..b7ebe96a59ba1a7d3e029187a0012adf1796b75f 100644 (file)
@@ -924,7 +924,7 @@ static struct bfd_link_hash_table *
 coff_arm_link_hash_table_create (bfd * abfd)
 {
   struct coff_arm_link_hash_table * ret;
-  bfd_size_type amt = sizeof (struct coff_arm_link_hash_table);
+  size_t amt = sizeof (struct coff_arm_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -1026,7 +1026,7 @@ find_thumb_glue (struct bfd_link_info *info,
 {
   char *tmp_name;
   struct coff_link_hash_entry *myh;
-  bfd_size_type amt = strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1;
+  size_t amt = strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1;
 
   tmp_name = bfd_malloc (amt);
 
@@ -1055,7 +1055,7 @@ find_arm_glue (struct bfd_link_info *info,
 {
   char *tmp_name;
   struct coff_link_hash_entry * myh;
-  bfd_size_type amt = strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1;
+  size_t amt = strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1;
 
   tmp_name = bfd_malloc (amt);
 
@@ -1840,7 +1840,7 @@ record_arm_to_thumb_glue (struct bfd_link_info *  info,
   struct bfd_link_hash_entry *     bh;
   struct coff_arm_link_hash_table * globals;
   bfd_vma val;
-  bfd_size_type amt;
+  size_t amt;
 
   globals = coff_arm_hash_table (info);
 
@@ -1896,7 +1896,7 @@ record_thumb_to_arm_glue (struct bfd_link_info *  info,
   struct bfd_link_hash_entry *      bh;
   struct coff_arm_link_hash_table *  globals;
   bfd_vma val;
-  bfd_size_type amt;
+  size_t amt;
 
   globals = coff_arm_hash_table (info);
 
index 3efa89de5ac9385963c4793e026a4535663c696d..bc7118fe051926bf2b63d3b17dc42f3f4eca7d22 100644 (file)
@@ -179,7 +179,7 @@ static struct bfd_link_hash_table *
 ppc_coff_link_hash_table_create (bfd *abfd)
 {
   struct ppc_coff_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct ppc_coff_link_hash_table);
+  size_t amt = sizeof (struct ppc_coff_link_hash_table);
 
   ret = (struct ppc_coff_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
@@ -771,7 +771,7 @@ record_toc (asection *toc_section,
            const char *name)
 {
   /* Add this entry to our toc addr-offset-name list.  */
-  bfd_size_type amt = sizeof (struct list_ele);
+  size_t amt = sizeof (struct list_ele);
   struct list_ele *t = (struct list_ele *) bfd_malloc (amt);
 
   if (t == NULL)
@@ -1513,7 +1513,6 @@ ppc_allocate_toc_section (struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   asection *s;
   bfd_byte *foo;
-  bfd_size_type amt;
   static char test_char = '1';
 
   if ( global_toc_size == 0 ) /* FIXME: does this get me in trouble?  */
@@ -1528,8 +1527,7 @@ ppc_allocate_toc_section (struct bfd_link_info *info ATTRIBUTE_UNUSED)
     /* No toc section? Something is very wrong.  */
     abort ();
 
-  amt = global_toc_size;
-  foo = (bfd_byte *) bfd_alloc (bfd_of_toc_owner, amt);
+  foo = (bfd_byte *) bfd_alloc (bfd_of_toc_owner, global_toc_size);
   memset(foo, test_char, (size_t) global_toc_size);
 
   s->size = global_toc_size;
index e14db6f4891114bccfb1a312353fc889e1cf3baf..86b4763a10fb0669be524b10875a05d44e853bea 100644 (file)
@@ -323,7 +323,7 @@ bfd_boolean
 _bfd_xcoff_mkobject (bfd *abfd)
 {
   coff_data_type *coff;
-  bfd_size_type amt = sizeof (struct xcoff_tdata);
+  size_t amt = sizeof (struct xcoff_tdata);
 
   abfd->tdata.xcoff_obj_data = (struct xcoff_tdata *) bfd_zalloc (abfd, amt);
   if (abfd->tdata.xcoff_obj_data == NULL)
@@ -1389,7 +1389,7 @@ _bfd_xcoff_archive_p (bfd *abfd)
 {
   struct artdata *tdata_hold;
   char magic[SXCOFFARMAG];
-  bfd_size_type amt = SXCOFFARMAG;
+  size_t amt = SXCOFFARMAG;
 
   if (bfd_bread (magic, amt, abfd) != amt)
     {
index 2236884138c0cb7eb07598a990cc470e24a26e83..986cd4d1d04f33d0f61847e22689670f4a3dce3a 100644 (file)
@@ -722,7 +722,7 @@ sh_relax_section (bfd *abfd,
 
   if (coff_section_data (abfd, sec) == NULL)
     {
-      bfd_size_type amt = sizeof (struct coff_section_tdata);
+      size_t amt = sizeof (struct coff_section_tdata);
       sec->used_by_bfd = bfd_zalloc (abfd, amt);
       if (sec->used_by_bfd == NULL)
        return FALSE;
index 0588567f0782ee1a1cab95262d8c773603f87614..d39fe4c590018a2ba4b2052d4497d316128f410f 100644 (file)
@@ -2000,7 +2000,7 @@ xcoff64_archive_p (bfd *abfd)
   char magic[SXCOFFARMAG];
   /* This is the new format.  */
   struct xcoff_ar_file_hdr_big hdr;
-  bfd_size_type amt = SXCOFFARMAG;
+  size_t amt = SXCOFFARMAG;
 
   if (bfd_bread (magic, amt, abfd) != amt)
     {
index 96a7f20d3c7a0bc58c0c6a86a89e885635cac0c2..3311b9f813050b256c9db387839bb4fa317a2f7a 100644 (file)
@@ -1109,7 +1109,7 @@ handle_COMDAT (bfd * abfd,
                 drop through from the above).  */
              {
                char *newname;
-               bfd_size_type amt;
+               size_t amt;
 
                /* This must the second symbol with the
                   section #.  It is the actual symbol name.
@@ -1752,7 +1752,7 @@ static bfd_boolean
 coff_new_section_hook (bfd * abfd, asection * section)
 {
   combined_entry_type *native;
-  bfd_size_type amt;
+  size_t amt;
   unsigned char sclass = C_STAT;
 
   section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
@@ -1843,7 +1843,7 @@ coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED,
                         void * scnhdr)
 {
   struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
-  bfd_size_type amt;
+  size_t amt;
   unsigned int alignment_power_const
     = hdr->s_flags & IMAGE_SCN_ALIGN_POWER_BIT_MASK;
 
@@ -1972,7 +1972,7 @@ static bfd_boolean
 coff_mkobject (bfd * abfd)
 {
   coff_data_type *coff;
-  bfd_size_type amt = sizeof (coff_data_type);
+  size_t amt = sizeof (coff_data_type);
 
   abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt);
   if (abfd->tdata.coff_obj_data == NULL)
@@ -3088,7 +3088,7 @@ coff_compute_section_file_positions (bfd * abfd)
         page size too, and remember both sizes.  */
       if (coff_section_data (abfd, current) == NULL)
        {
-         bfd_size_type amt = sizeof (struct coff_section_tdata);
+         size_t amt = sizeof (struct coff_section_tdata);
 
          current->used_by_bfd = bfd_zalloc (abfd, amt);
          if (current->used_by_bfd == NULL)
@@ -3096,7 +3096,7 @@ coff_compute_section_file_positions (bfd * abfd)
        }
       if (pei_section_data (abfd, current) == NULL)
        {
-         bfd_size_type amt = sizeof (struct pei_section_tdata);
+         size_t amt = sizeof (struct pei_section_tdata);
 
          coff_section_data (abfd, current)->tdata = bfd_zalloc (abfd, amt);
          if (coff_section_data (abfd, current)->tdata == NULL)
index 31e6fa7a083f2ab58e2ff8c6f928a46544f54f22..cf115d48c85e80449c3b2d25061075fc549646c8 100644 (file)
@@ -2025,7 +2025,7 @@ coff_get_reloc_upper_bound (bfd *abfd, sec_ptr asect)
 asymbol *
 coff_make_empty_symbol (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (coff_symbol_type);
+  size_t amt = sizeof (coff_symbol_type);
   coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_zalloc (abfd, amt);
 
   if (new_symbol == NULL)
@@ -2046,7 +2046,7 @@ coff_bfd_make_debug_symbol (bfd *abfd,
                            void * ptr ATTRIBUTE_UNUSED,
                            unsigned long sz ATTRIBUTE_UNUSED)
 {
-  bfd_size_type amt = sizeof (coff_symbol_type);
+  size_t amt = sizeof (coff_symbol_type);
   coff_symbol_type *new_symbol = (coff_symbol_type *) bfd_alloc (abfd, amt);
 
   if (new_symbol == NULL)
@@ -2271,7 +2271,7 @@ coff_find_nearest_line_with_names (bfd *abfd,
   combined_entry_type *pend;
   alent *l;
   struct coff_section_tdata *sec_data;
-  bfd_size_type amt;
+  size_t amt;
 
   /* Before looking through the symbol table, try to use a .stab
      section to find the information.  */
@@ -2594,7 +2594,7 @@ bfd_coff_set_symbol_class (bfd *   abfd,
         coff_write_alien_symbol().  */
 
       combined_entry_type * native;
-      bfd_size_type amt = sizeof (* native);
+      size_t amt = sizeof (* native);
 
       native = (combined_entry_type *) bfd_zalloc (abfd, amt);
       if (native == NULL)
index b2b64db95002451e9582ba09174fbfd36412f4d2..e52f543ee6e66ec8afd2724ffdb3e9690d2a1faf 100644 (file)
@@ -109,7 +109,7 @@ struct bfd_link_hash_table *
 _bfd_coff_link_hash_table_create (bfd *abfd)
 {
   struct coff_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct coff_link_hash_table);
+  size_t amt = sizeof (struct coff_link_hash_table);
 
   ret = (struct coff_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
@@ -1647,7 +1647,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd)
          struct coff_debug_merge_element **epp;
          bfd_byte *esl, *eslend;
          struct internal_syment *islp;
-         bfd_size_type amt;
+         size_t amt;
 
          name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf);
          if (name == NULL)
index 468188713ea75cf9c6c348f075da48f790234ff0..7ff80f336a7ac409d77d3ca17e04f5bcffd573ab 100644 (file)
@@ -140,7 +140,7 @@ struct linenumber
 static struct dwarf1_unit*
 alloc_dwarf1_unit (struct dwarf1_debug* stash)
 {
-  bfd_size_type amt = sizeof (struct dwarf1_unit);
+  size_t amt = sizeof (struct dwarf1_unit);
 
   struct dwarf1_unit* x = (struct dwarf1_unit *) bfd_zalloc (stash->abfd, amt);
   if (x)
@@ -158,7 +158,7 @@ alloc_dwarf1_unit (struct dwarf1_debug* stash)
 static struct dwarf1_func *
 alloc_dwarf1_func (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit)
 {
-  bfd_size_type amt = sizeof (struct dwarf1_func);
+  size_t amt = sizeof (struct dwarf1_func);
 
   struct dwarf1_func* x = (struct dwarf1_func *) bfd_zalloc (stash->abfd, amt);
   if (x)
index dd3568a8532c2254084ddc3ee6a12b26d45693b4..cd7aa286eba53ba5180605ff6689cb4b67dfe0da 100644 (file)
@@ -995,7 +995,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash,
   struct abbrev_info *cur_abbrev;
   unsigned int abbrev_number, bytes_read, abbrev_name;
   unsigned int abbrev_form, hash_number;
-  bfd_size_type amt;
+  size_t amt;
   void **slot;
   struct abbrev_offset_entry ent = { offset, NULL };
 
@@ -1158,7 +1158,7 @@ read_attribute_value (struct attribute *  attr,
   bfd *abfd = unit->abfd;
   unsigned int bytes_read;
   struct dwarf_block *blk;
-  bfd_size_type amt;
+  size_t amt;
 
   if (info_ptr >= info_ptr_end && form != DW_FORM_flag_present)
     {
@@ -1513,7 +1513,7 @@ add_line_info (struct line_info_table *table,
               unsigned int discriminator,
               int end_sequence)
 {
-  bfd_size_type amt = sizeof (struct line_info);
+  size_t amt = sizeof (struct line_info);
   struct line_sequence* seq = table->sequences;
   struct line_info* info = (struct line_info *) bfd_alloc (table->abfd, amt);
 
@@ -1782,11 +1782,11 @@ static bfd_boolean
 build_line_info_table (struct line_info_table *  table,
                       struct line_sequence *    seq)
 {
-  bfd_size_type      amt;
-  struct line_info** line_info_lookup;
-  struct line_info*  each_line;
-  unsigned int       num_lines;
-  unsigned int       line_index;
+  size_t amt;
+  struct line_info **line_info_lookup;
+  struct line_info *each_line;
+  unsigned int num_lines;
+  unsigned int line_index;
 
   if (seq->line_info_lookup != NULL)
     return TRUE;
@@ -1824,12 +1824,12 @@ build_line_info_table (struct line_info_table *  table,
 static bfd_boolean
 sort_line_sequences (struct line_info_table* table)
 {
-  bfd_size_type                 amt;
-  struct line_sequence*         sequences;
-  struct line_sequence*         seq;
-  unsigned int          n = 0;
-  unsigned int          num_sequences = table->num_sequences;
-  bfd_vma               last_high_pc;
+  size_t amt;
+  struct line_sequence *sequences;
+  struct line_sequence *seq;
+  unsigned int n = 0;
+  unsigned int num_sequences = table->num_sequences;
+  bfd_vma last_high_pc;
 
   if (num_sequences == 0)
     return TRUE;
@@ -1897,7 +1897,7 @@ line_info_add_include_dir (struct line_info_table *table, char *cur_dir)
   if ((table->num_dirs % DIR_ALLOC_CHUNK) == 0)
     {
       char **tmp;
-      bfd_size_type amt;
+      size_t amt;
 
       amt = table->num_dirs + DIR_ALLOC_CHUNK;
       amt *= sizeof (char *);
@@ -1931,7 +1931,7 @@ line_info_add_file_name (struct line_info_table *table, char *cur_file,
   if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
     {
       struct fileinfo *tmp;
-      bfd_size_type amt;
+      size_t amt;
 
       amt = table->num_files + FILE_ALLOC_CHUNK;
       amt *= sizeof (struct fileinfo);
@@ -2091,7 +2091,7 @@ decode_line_info (struct comp_unit *unit)
   char *cur_file, *cur_dir;
   unsigned char op_code, extended_op, adj_opcode;
   unsigned int exop_len;
-  bfd_size_type amt;
+  size_t amt;
 
   if (unit->line_offset == 0 && file->line_table)
     return file->line_table;
@@ -3226,7 +3226,7 @@ scan_unit_for_symbols (struct comp_unit *unit)
          || abbrev->tag == DW_TAG_entry_point
          || abbrev->tag == DW_TAG_inlined_subroutine)
        {
-         bfd_size_type amt = sizeof (struct funcinfo);
+         size_t amt = sizeof (struct funcinfo);
          func = (struct funcinfo *) bfd_zalloc (abfd, amt);
          if (func == NULL)
            goto fail;
@@ -3250,7 +3250,7 @@ scan_unit_for_symbols (struct comp_unit *unit)
          func = NULL;
          if (abbrev->tag == DW_TAG_variable)
            {
-             bfd_size_type amt = sizeof (struct varinfo);
+             size_t amt = sizeof (struct varinfo);
              var = (struct varinfo *) bfd_zalloc (abfd, amt);
              if (var == NULL)
                goto fail;
@@ -3469,7 +3469,7 @@ parse_comp_unit (struct dwarf2_debug *stash,
   struct abbrev_info *abbrev;
   struct attribute attr;
   bfd_byte *end_ptr = info_ptr + unit_length;
-  bfd_size_type amt;
+  size_t amt;
   bfd_vma low_pc = 0;
   bfd_vma high_pc = 0;
   bfd *abfd = file->bfd_ptr;
@@ -4084,7 +4084,7 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash)
   else
     {
       bfd_vma last_vma = 0, last_dwarf = 0;
-      bfd_size_type amt = i * sizeof (struct adjusted_section);
+      size_t amt = i * sizeof (struct adjusted_section);
 
       p = (struct adjusted_section *) bfd_malloc (amt);
       if (p == NULL)
@@ -4452,7 +4452,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd,
                              void **pinfo,
                              bfd_boolean do_place)
 {
-  bfd_size_type amt = sizeof (struct dwarf2_debug);
+  size_t amt = sizeof (struct dwarf2_debug);
   bfd_size_type total_size;
   asection *msec;
   struct dwarf2_debug *stash = (struct dwarf2_debug *) *pinfo;
index 050fd7b508174f8e50a58e7aec1fdd2d03a4e54d..e8ccbd45df7a55bbd4abd6c6083345b4db83007a 100644 (file)
@@ -87,7 +87,7 @@ static asection bfd_debug_section =
 bfd_boolean
 _bfd_ecoff_mkobject (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (ecoff_data_type);
+  size_t amt = sizeof (ecoff_data_type);
 
   abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
   if (abfd->tdata.ecoff_obj_data == NULL)
@@ -650,7 +650,7 @@ asymbol *
 _bfd_ecoff_make_empty_symbol (bfd *abfd)
 {
   ecoff_symbol_type *new_symbol;
-  bfd_size_type amt = sizeof (ecoff_symbol_type);
+  size_t amt = sizeof (ecoff_symbol_type);
 
   new_symbol = (ecoff_symbol_type *) bfd_zalloc (abfd, amt);
   if (new_symbol == NULL)
@@ -1762,7 +1762,7 @@ _bfd_ecoff_find_nearest_line (bfd *abfd,
 
   if (ecoff_data (abfd)->find_line_info == NULL)
     {
-      bfd_size_type amt = sizeof (struct ecoff_find_line);
+      size_t amt = sizeof (struct ecoff_find_line);
 
       ecoff_data (abfd)->find_line_info =
          (struct ecoff_find_line *) bfd_zalloc (abfd, amt);
@@ -3230,7 +3230,7 @@ struct bfd_link_hash_table *
 _bfd_ecoff_bfd_link_hash_table_create (bfd *abfd)
 {
   struct ecoff_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct ecoff_link_hash_table);
+  size_t amt = sizeof (struct ecoff_link_hash_table);
 
   ret = (struct ecoff_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
index 5fc96e671b844d78af4ca295694961ec90d85e9d..ba2bbbc868a78e095025725cc297e9c4df662d6d 100644 (file)
@@ -467,7 +467,7 @@ bfd_ecoff_debug_init (bfd *output_bfd ATTRIBUTE_UNUSED,
                      struct bfd_link_info *info)
 {
   struct accumulate *ainfo;
-  bfd_size_type amt = sizeof (struct accumulate);
+  size_t amt = sizeof (struct accumulate);
 
   ainfo = (struct accumulate *) bfd_malloc (amt);
   if (!ainfo)
index 7875e63ff7287f926ad9b406eba039c6f4d36812..1e10c5c851285b99012e1e3fbde26b4cf1d33291 100644 (file)
@@ -754,7 +754,7 @@ _bfd_elf_hppa_gen_reloc_type (bfd *abfd,
 {
   elf_hppa_reloc_type *finaltype;
   elf_hppa_reloc_type **final_types;
-  bfd_size_type amt = sizeof (elf_hppa_reloc_type *) * 2;
+  size_t amt = sizeof (elf_hppa_reloc_type *) * 2;
 
   /* Allocate slots for the BFD relocation.  */
   final_types = bfd_alloc (abfd, amt);
index 88b4d5e3acf340da52180aac03f13387cb81e3f3..b15af60b978525fa8c5e5504e54215d531f8d1af 100644 (file)
@@ -2743,7 +2743,7 @@ mn10300_elf_relax_section (bfd *abfd,
                          /* A local symbol.  */
                          Elf_Internal_Sym *isym;
                          struct elf_link_hash_table *elftab;
-                         bfd_size_type amt;
+                         size_t amt;
 
                          isym = isymbuf + r_index;
                          if (isym->st_shndx == SHN_UNDEF)
@@ -2844,7 +2844,7 @@ mn10300_elf_relax_section (bfd *abfd,
                          && ELF_ST_TYPE (isym->st_info) == STT_FUNC)
                        {
                          struct elf_link_hash_table *elftab;
-                         bfd_size_type amt;
+                         size_t amt;
                          struct elf_link_hash_entry **lhashes = hashes;
 
                          /* Skip a local symbol if it aliases a
@@ -3069,7 +3069,7 @@ mn10300_elf_relax_section (bfd *abfd,
                  const char *sym_name;
                  char *new_name;
                  struct elf_link_hash_table *elftab;
-                 bfd_size_type amt;
+                 size_t amt;
 
                  if (isym->st_shndx != sec_shndx)
                    continue;
@@ -4602,7 +4602,7 @@ static struct bfd_link_hash_table *
 elf32_mn10300_link_hash_table_create (bfd *abfd)
 {
   struct elf32_mn10300_link_hash_table *ret;
-  bfd_size_type amt = sizeof (* ret);
+  size_t amt = sizeof (* ret);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index 04a746ef31a50ea0f27f965bd9f7ebaf9ea40327..d3e50c76cf82597ded0c345c3d397949df56a024 100644 (file)
@@ -95,7 +95,7 @@ struct elf_strtab_hash *
 _bfd_elf_strtab_init (void)
 {
   struct elf_strtab_hash *table;
-  bfd_size_type amt = sizeof (struct elf_strtab_hash);
+  size_t amt = sizeof (struct elf_strtab_hash);
 
   table = (struct elf_strtab_hash *) bfd_malloc (amt);
   if (table == NULL)
index c85face6309ffeba8f95549d297a90aa31b5375a..2e045a7f255d8ea390357bc9fb2ee205a0dc1141 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -4551,7 +4551,7 @@ make_mapping (bfd *abfd,
   struct elf_segment_map *m;
   unsigned int i;
   asection **hdrpp;
-  bfd_size_type amt;
+  size_t amt;
 
   amt = sizeof (struct elf_segment_map) - sizeof (asection *);
   amt += (to - from) * sizeof (asection *);
@@ -7485,7 +7485,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
     {
       asection *section;
       unsigned int section_count;
-      bfd_size_type amt;
+      size_t amt;
       Elf_Internal_Shdr *this_hdr;
       asection *first_section = NULL;
       asection *lowest_section;
@@ -7507,7 +7507,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
       /* Allocate a segment map big enough to contain
         all of the sections we have selected.  */
       amt = sizeof (struct elf_segment_map) - sizeof (asection *);
-      amt += (bfd_size_type) section_count * sizeof (asection *);
+      amt += section_count * sizeof (asection *);
       map = (struct elf_segment_map *) bfd_zalloc (obfd, amt);
       if (map == NULL)
        return FALSE;
index faf8376f2006f9c8f8da977fd5341741af84ecd5..a35dc9958d4bd8ca3a530f32acf6a574f0f0c546 100644 (file)
@@ -4110,7 +4110,7 @@ static struct bfd_link_hash_table *
 elf32_arm_link_hash_table_create (bfd *abfd)
 {
   struct elf32_arm_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table);
+  size_t amt = sizeof (struct elf32_arm_link_hash_table);
 
   ret = (struct elf32_arm_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -5304,7 +5304,7 @@ elf32_arm_setup_section_lists (bfd *output_bfd,
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
 
   if (htab == NULL)
@@ -15721,7 +15721,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
          p = *head;
          if (p == NULL || p->sec != sec)
            {
-             bfd_size_type amt = sizeof *p;
+             size_t amt = sizeof *p;
 
              p = (struct elf_dyn_relocs *) bfd_alloc (htab->root.dynobj, amt);
              if (p == NULL)
@@ -18577,7 +18577,7 @@ elf32_arm_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       _arm_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = (_arm_elf_section_data *) bfd_zalloc (abfd, amt);
       if (sdata == NULL)
index e2d4de621147574f08889a7037dbc00144343de3..2a6e743512d7d0e1123eed55b1dab88bff909060 100644 (file)
@@ -767,7 +767,7 @@ elf_avr_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       struct elf_avr_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
@@ -875,7 +875,7 @@ static struct bfd_link_hash_table *
 elf32_avr_link_hash_table_create (bfd *abfd)
 {
   struct elf32_avr_link_hash_table *htab;
-  bfd_size_type amt = sizeof (*htab);
+  size_t amt = sizeof (*htab);
 
   htab = bfd_zmalloc (amt);
   if (htab == NULL)
@@ -3494,7 +3494,7 @@ elf32_avr_setup_section_lists (bfd *output_bfd,
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct elf32_avr_link_hash_table *htab = avr_link_hash_table (info);
 
   if (htab == NULL || htab->no_stubs)
@@ -3558,7 +3558,7 @@ get_local_syms (bfd *input_bfd, struct bfd_link_info *info)
   unsigned int bfd_indx;
   Elf_Internal_Sym *local_syms, **all_local_syms;
   struct elf32_avr_link_hash_table *htab = avr_link_hash_table (info);
-  bfd_size_type amt;
+  size_t amt;
 
   if (htab == NULL)
     return -1;
index 1631ef91d67e61f2f43ea30fda9657343695fd95..7ebd9192b663e19a14f88a519c97c1cc339dfd2d 100644 (file)
@@ -1728,7 +1728,7 @@ static struct bfd_link_hash_table *
 bfinfdpic_elf_link_hash_table_create (bfd *abfd)
 {
   struct bfinfdpic_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct bfinfdpic_elf_link_hash_table);
+  size_t amt = sizeof (struct bfinfdpic_elf_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -4842,7 +4842,7 @@ static struct bfd_link_hash_table *
 bfin_link_hash_table_create (bfd * abfd)
 {
   struct bfin_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct bfin_link_hash_table);
+  size_t amt = sizeof (struct bfin_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index cefd69ed3a2876e13b38e9cf81a713e0acea02a5..6d1e66935c4c33dffe75ba1d7d972a7a60d54149 100644 (file)
@@ -1641,7 +1641,7 @@ static struct bfd_link_hash_table *
 elf32_cr16_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_link_hash_table);
+  size_t amt = sizeof (struct elf_link_hash_table);
 
   ret = (struct elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == (struct elf_link_hash_table *) NULL)
index ad3830901ea0779baefdff61c2c471202ee8af4d..bee7108684924e98b2fc5e83896cd43c06259b60 100644 (file)
@@ -889,7 +889,7 @@ static struct bfd_link_hash_table *
 elf_cris_link_hash_table_create (bfd *abfd)
 {
   struct elf_cris_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_cris_link_hash_table);
+  size_t amt = sizeof (struct elf_cris_link_hash_table);
 
   ret = ((struct elf_cris_link_hash_table *) bfd_zmalloc (amt));
   if (ret == (struct elf_cris_link_hash_table *) NULL)
index 04214f28ea5d606e1390e11401e17e623f95743a..f91d05bd60e62b3476b292c2de526d918b9d0369 100644 (file)
@@ -1500,7 +1500,7 @@ static struct bfd_link_hash_table *
 csky_elf_link_hash_table_create (bfd *abfd)
 {
   struct csky_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct csky_elf_link_hash_table);
+  size_t amt = sizeof (struct csky_elf_link_hash_table);
 
   ret = (struct csky_elf_link_hash_table*) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -2712,7 +2712,7 @@ csky_elf_check_relocs (bfd * abfd,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
                  if (p == NULL)
@@ -3770,7 +3770,7 @@ elf32_csky_setup_section_lists (bfd *output_bfd,
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct csky_elf_link_hash_table *htab = csky_elf_hash_table (info);
 
   if (!htab)
index 4934ba6f1066905efb6d3cb8d356f9274a6a083b..056cc93055dac3d86a693b487b3d72b2bc9d4a6e 100644 (file)
@@ -942,7 +942,7 @@ static struct bfd_link_hash_table *
 frvfdpic_elf_link_hash_table_create (bfd *abfd)
 {
   struct frvfdpic_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct frvfdpic_elf_link_hash_table);
+  size_t amt = sizeof (struct frvfdpic_elf_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index 2e653083ce05a77b3e33c056e2f9a51b327c2b22..b1b0f8284c41f876e46bdc651f2bbe42bc07d76b 100644 (file)
@@ -418,7 +418,7 @@ static struct bfd_link_hash_table *
 elf32_hppa_link_hash_table_create (bfd *abfd)
 {
   struct elf32_hppa_link_hash_table *htab;
-  bfd_size_type amt = sizeof (*htab);
+  size_t amt = sizeof (*htab);
 
   htab = bfd_zmalloc (amt);
   if (htab == NULL)
@@ -2407,7 +2407,7 @@ elf32_hppa_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
 
   if (htab == NULL)
@@ -2596,7 +2596,7 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info)
   /* We want to read in symbol extension records only once.  To do this
      we need to read in the local symbols in parallel and save them for
      later use; so hold pointers to the local symbols in an array.  */
-  bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
+  size_t amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
   all_local_syms = bfd_zmalloc (amt);
   htab->all_local_syms = all_local_syms;
   if (all_local_syms == NULL)
index 2f994bf969e286486416cc1d04d594176925e3ae..88076b5a039044d64bb91a82a8f888895b8f0caf 100644 (file)
@@ -1875,7 +1875,7 @@ do_size:
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = (struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj,
                                                           amt);
                  if (p == NULL)
index c329af95002c28c81e8652fcdad0e1d7d8afc2ec..82c4fa0eef7ec5e4d192d3aa3f20af7c7e6b8de9 100644 (file)
@@ -132,7 +132,7 @@ static struct bfd_link_hash_table *
 lm32_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_lm32_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_lm32_link_hash_table);
+  size_t amt = sizeof (struct elf_lm32_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index 75a5650549543b8a0530ccb30072e1338478f10f..edc95b5d63a824edaae2c18400aedeb9c3eb0808 100644 (file)
@@ -1575,7 +1575,7 @@ static struct bfd_link_hash_table *
 m32r_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_m32r_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_m32r_link_hash_table);
+  size_t amt = sizeof (struct elf_m32r_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -3775,7 +3775,7 @@ m32r_elf_check_relocs (bfd *abfd,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof (*p);
+                 size_t amt = sizeof (*p);
 
                  p = bfd_alloc (dynobj, amt);
                  if (p == NULL)
index 7e0fd64f06f426baf0a78ee95a256dd55752076d..56c5129577584adc587046763fb0106179b3636e 100644 (file)
@@ -77,7 +77,7 @@ struct m68hc11_elf_link_hash_table*
 m68hc11_elf_hash_table_create (bfd *abfd)
 {
   struct m68hc11_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct m68hc11_elf_link_hash_table);
+  size_t amt = sizeof (struct m68hc11_elf_link_hash_table);
 
   ret = (struct m68hc11_elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == (struct m68hc11_elf_link_hash_table *) NULL)
@@ -241,7 +241,7 @@ elf32_m68hc11_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   asection *text_section;
   struct m68hc11_elf_link_hash_table *htab;
 
@@ -334,7 +334,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
   asection *section;
   Elf_Internal_Sym *local_syms, **all_local_syms;
   unsigned int bfd_indx, bfd_count;
-  bfd_size_type amt;
+  size_t amt;
   asection *stub_sec;
   struct m68hc11_elf_link_hash_table *htab = m68hc11_elf_hash_table (info);
 
index b0d32ae4e05bc6910ff92c4be376f359c31f7c32..5ffede198223f3d4a35ae4da9fe60989c5b33507 100644 (file)
@@ -971,7 +971,7 @@ static struct bfd_link_hash_table *
 elf_m68k_link_hash_table_create (bfd *abfd)
 {
   struct elf_m68k_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_m68k_link_hash_table);
+  size_t amt = sizeof (struct elf_m68k_link_hash_table);
 
   ret = (struct elf_m68k_link_hash_table *) bfd_zmalloc (amt);
   if (ret == (struct elf_m68k_link_hash_table *) NULL)
index 08eb70bdedc4012678f80b07ecc604b42819e0f6..07e9856fa9060ffa33b2e473acc82f604df277c7 100644 (file)
@@ -1021,7 +1021,7 @@ static struct bfd_link_hash_table *
 elf_metag_link_hash_table_create (bfd *abfd)
 {
   struct elf_metag_link_hash_table *htab;
-  bfd_size_type amt = sizeof (*htab);
+  size_t amt = sizeof (*htab);
 
   htab = bfd_zmalloc (amt);
   if (htab == NULL)
@@ -3562,7 +3562,7 @@ elf_metag_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct elf_metag_link_hash_table *htab = metag_link_hash_table (info);
 
   /* Count the number of input BFDs and find the top input section id.  */
@@ -3741,7 +3741,7 @@ get_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *input_bfd,
   /* We want to read in symbol extension records only once.  To do this
      we need to read in the local symbols in parallel and save them for
      later use; so hold pointers to the local symbols in an array.  */
-  bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
+  size_t amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
   all_local_syms = bfd_zmalloc (amt);
   htab->all_local_syms = all_local_syms;
   if (all_local_syms == NULL)
index 7b839f8c9a0c6fa4f95937ca8539ad4d2fbf0917..bccb0afcf4fa70ccece75802571573dae74352ef 100644 (file)
@@ -803,7 +803,7 @@ static struct bfd_link_hash_table *
 microblaze_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf32_mb_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf32_mb_link_hash_table);
+  size_t amt = sizeof (struct elf32_mb_link_hash_table);
 
   ret = (struct elf32_mb_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -2551,7 +2551,7 @@ microblaze_elf_check_relocs (bfd * abfd,
                p = *head;
                if (p == NULL || p->sec != sec)
                  {
-                   bfd_size_type amt = sizeof *p;
+                   size_t amt = sizeof *p;
                    p = ((struct elf_dyn_relocs *)
                         bfd_alloc (htab->elf.dynobj, amt));
                    if (p == NULL)
index 3168587560a945eba927573adbf74de89c44f750..2eaf0129156d7a1b8bcb5d88c310287327804b30 100644 (file)
@@ -3684,7 +3684,7 @@ nds32_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_nds32_link_hash_table *ret;
 
-  bfd_size_type amt = sizeof (struct elf_nds32_link_hash_table);
+  size_t amt = sizeof (struct elf_nds32_link_hash_table);
 
   ret = (struct elf_nds32_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -7442,7 +7442,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof (*p);
+                 size_t amt = sizeof (*p);
                  p = (struct elf_dyn_relocs *) bfd_alloc (dynobj, amt);
                  if (p == NULL)
                    return FALSE;
index 947eaeba76f65a0ca7197800ec9846cee8813c71..fd05fb0936122b3bcf5f836c81ad1bc20d88e2ed 100644 (file)
@@ -2228,7 +2228,7 @@ nios2_elf32_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct elf32_nios2_link_hash_table *htab = elf32_nios2_hash_table (info);
 
   /* Count the number of input BFDs and find the top input section id.  */
@@ -2560,7 +2560,7 @@ get_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *input_bfd,
   /* We want to read in symbol extension records only once.  To do this
      we need to read in the local symbols in parallel and save them for
      later use; so hold pointers to the local symbols in an array.  */
-  bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
+  size_t amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
   all_local_syms = bfd_zmalloc (amt);
   htab->all_local_syms = all_local_syms;
   if (all_local_syms == NULL)
@@ -4943,7 +4943,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->root.dynobj, amt));
                  if (p == NULL)
@@ -5961,7 +5961,7 @@ static struct bfd_link_hash_table *
 nios2_elf32_link_hash_table_create (bfd *abfd)
 {
   struct elf32_nios2_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf32_nios2_link_hash_table);
+  size_t amt = sizeof (struct elf32_nios2_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index 31ef758a9264c7316b408a3dbaa8f07a3ff70f62..41e61ac7e2fcec80071ce91415cf56883b16a696 100644 (file)
@@ -970,7 +970,7 @@ static struct bfd_link_hash_table *
 or1k_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_or1k_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_or1k_link_hash_table);
+  size_t amt = sizeof (struct elf_or1k_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -2118,7 +2118,7 @@ or1k_elf_check_relocs (bfd *abfd,
                p = *head;
                if (p == NULL || p->sec != sec)
                  {
-                   bfd_size_type amt = sizeof *p;
+                   size_t amt = sizeof *p;
                    p = ((struct elf_dyn_relocs *)
                         bfd_alloc (htab->root.dynobj, amt));
                    if (p == NULL)
index 839d5ff142a7fff40be1fc03b6912fb2cb2bc919..3a42a4e10594f5a9b115af78b9a66b485102eafa 100644 (file)
@@ -1394,7 +1394,7 @@ ppc_elf_modify_segment_map (bfd *abfd,
   for (m = elf_seg_map (abfd); m != NULL; m = m->next)
     {
       struct elf_segment_map *n;
-      bfd_size_type amt;
+      size_t amt;
       unsigned int j, k;
       unsigned int p_flags;
 
@@ -2802,7 +2802,7 @@ update_plt_info (bfd *abfd, struct plt_entry **plist,
       break;
   if (ent == NULL)
     {
-      bfd_size_type amt = sizeof (*ent);
+      size_t amt = sizeof (*ent);
       ent = bfd_alloc (abfd, amt);
       if (ent == NULL)
        return FALSE;
index dd2e92d3bde4f4249b8fc9fca2f2d8b0d491f8f9..fdb28e71ecb1f219f6959305b7a21e8f4eaa9685 100644 (file)
@@ -1554,7 +1554,7 @@ static struct bfd_link_hash_table *
 pru_elf32_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_link_hash_table);
+  size_t amt = sizeof (struct elf_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index 7990996bad884584a24a570818a6f98cc09bb503..9490b67b00b3dd38e9e6d5e82732f7d10ac90c4d 100644 (file)
@@ -803,7 +803,7 @@ static struct bfd_link_hash_table *
 elf_s390_link_hash_table_create (bfd *abfd)
 {
   struct elf_s390_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_s390_link_hash_table);
+  size_t amt = sizeof (struct elf_s390_link_hash_table);
 
   ret = (struct elf_s390_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -1332,7 +1332,7 @@ elf_s390_check_relocs (bfd *abfd,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
 
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
index 1e76c00b6dfec59197df97a2bb77a89ee148793a..8c2e3042ae84fb7566ddc14c71ee5e8de5233eff 100644 (file)
@@ -1410,7 +1410,7 @@ score_elf_create_got_section (bfd *abfd,
   struct elf_link_hash_entry *h;
   struct bfd_link_hash_entry *bh;
   struct score_got_info *g;
-  bfd_size_type amt;
+  size_t amt;
 
   /* This function may be called more than once.  */
   s = score_elf_got_section (abfd, TRUE);
@@ -4057,7 +4057,7 @@ static bfd_boolean
 s3_elf32_score_new_section_hook (bfd *abfd, asection *sec)
 {
   struct _score_elf_section_data *sdata;
-  bfd_size_type amt = sizeof (*sdata);
+  size_t amt = sizeof (*sdata);
 
   sdata = bfd_zalloc (abfd, amt);
   if (sdata == NULL)
@@ -4359,7 +4359,7 @@ static struct bfd_link_hash_table *
 elf32_score_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_link_hash_table);
+  size_t amt = sizeof (struct elf_link_hash_table);
 
   ret = (struct elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
index 6f37e9f89a11f08e38fd32087f7644e256fbae24..752796c45be9037b4a52b2659259378dbe82f44a 100644 (file)
@@ -1268,7 +1268,7 @@ score_elf_create_got_section (bfd *abfd,
   struct elf_link_hash_entry *h;
   struct bfd_link_hash_entry *bh;
   struct score_got_info *g;
-  bfd_size_type amt;
+  size_t amt;
 
   /* This function may be called more than once.  */
   s = score_elf_got_section (abfd, TRUE);
@@ -3862,7 +3862,7 @@ bfd_boolean
 s7_elf32_score_new_section_hook (bfd *abfd, asection *sec)
 {
   struct _score_elf_section_data *sdata;
-  bfd_size_type amt = sizeof (*sdata);
+  size_t amt = sizeof (*sdata);
 
   sdata = bfd_zalloc (abfd, amt);
   if (sdata == NULL)
index 9200e6a19291b2af48b8a9903f8892933dae0b7d..9a00bde1d997b46011b3fb0b306a5d1ed2bc3f66 100644 (file)
@@ -2256,7 +2256,7 @@ static struct bfd_link_hash_table *
 sh_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_sh_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_sh_link_hash_table);
+  size_t amt = sizeof (struct elf_sh_link_hash_table);
 
   ret = (struct elf_sh_link_hash_table *) bfd_zmalloc (amt);
   if (ret == (struct elf_sh_link_hash_table *) NULL)
@@ -5863,7 +5863,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof (*p);
+                 size_t amt = sizeof (*p);
                  p = bfd_alloc (htab->root.dynobj, amt);
                  if (p == NULL)
                    return FALSE;
index 39ca6992007dd6d84a4a00801702792b68985d5f..95814d3abf1d40f57c5ad18f3193ed77615c7772 100644 (file)
@@ -1595,7 +1595,7 @@ static struct bfd_link_hash_table *
 elf32_tic6x_link_hash_table_create (bfd *abfd)
 {
   struct elf32_tic6x_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf32_tic6x_link_hash_table);
+  size_t amt = sizeof (struct elf32_tic6x_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -2147,7 +2147,7 @@ elf32_tic6x_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       _tic6x_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = (_tic6x_elf_section_data *) bfd_zalloc (abfd, amt);
       if (sdata == NULL)
@@ -2945,7 +2945,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = bfd_alloc (htab->elf.dynobj, amt);
                  if (p == NULL)
                    return FALSE;
index f821389e923b821be6620ae445d0fb932320acae..f16f5851cf62f33f2311f0aa72209fcfe10bcc71 100644 (file)
@@ -1189,7 +1189,7 @@ static struct bfd_link_hash_table *
 tilepro_elf_link_hash_table_create (bfd *abfd)
 {
   struct tilepro_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct tilepro_elf_link_hash_table);
+  size_t amt = sizeof (struct tilepro_elf_link_hash_table);
 
   ret = (struct tilepro_elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -1788,7 +1788,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
                  if (p == NULL)
index 21cd4f29375fbfe464aaef078f4a2a8de95be27f..afebb2ab86f373fda5f7f93ff8339a0821dad612 100644 (file)
@@ -230,7 +230,7 @@ static void
 remember_hi16s_reloc (bfd *abfd, bfd_vma addend, bfd_byte *address)
 {
   hi16s_location * entry = NULL;
-  bfd_size_type amt = sizeof (* free_hi16s);
+  size_t amt = sizeof (* free_hi16s);
 
   /* Find a free structure.  */
   if (free_hi16s == NULL)
index f32097d7035fc944ca1cdee47b3bf1494b8ce5cd..fa84e0be19ae78349df667a2bffde8a0d8df0581 100644 (file)
@@ -470,7 +470,7 @@ static struct bfd_link_hash_table *
 elf_vax_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_link_hash_table);
+  size_t amt = sizeof (struct elf_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index 12ff9f772aafaa577f1ac582e3cc9c9205dd9625..58927d620f3f0a5edfbcd55e2546c2d96df86771 100644 (file)
@@ -686,7 +686,7 @@ elf_xtensa_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_entry *tlsbase;
   struct elf_xtensa_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_xtensa_link_hash_table);
+  size_t amt = sizeof (struct elf_xtensa_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -6039,7 +6039,7 @@ elf_xtensa_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       struct elf_xtensa_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
index 94642ab5151ef05d8a56828782e461a11ced3e17..96ce158b55adf6e53922727e9fef9ad50467085d 100644 (file)
@@ -280,7 +280,7 @@ static struct bfd_link_hash_table *
 elf64_alpha_bfd_link_hash_table_create (bfd *abfd)
 {
   struct alpha_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct alpha_elf_link_hash_table);
+  size_t amt = sizeof (struct alpha_elf_link_hash_table);
 
   ret = (struct alpha_elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == (struct alpha_elf_link_hash_table *) NULL)
@@ -1724,7 +1724,7 @@ get_got_entry (bfd *abfd, struct alpha_elf_link_hash_entry *h,
   if (!gotent)
     {
       int entry_size;
-      bfd_size_type amt;
+      size_t amt;
 
       amt = sizeof (struct alpha_elf_got_entry);
       gotent = (struct alpha_elf_got_entry *) bfd_alloc (abfd, amt);
@@ -1787,7 +1787,6 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
   Elf_Internal_Shdr *symtab_hdr;
   struct alpha_elf_link_hash_entry **sym_hashes;
   const Elf_Internal_Rela *rel, *relend;
-  bfd_size_type amt;
 
   if (bfd_link_relocatable (info))
     return TRUE;
@@ -1990,7 +1989,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
 
              if (!rent)
                {
-                 amt = sizeof (struct alpha_elf_reloc_entry);
+                 size_t amt = sizeof (struct alpha_elf_reloc_entry);
                  rent = (struct alpha_elf_reloc_entry *) bfd_alloc (abfd, amt);
                  if (!rent)
                    return FALSE;
index 66b82d88e4beb1a99cea1418480edbd48ed3058f..f0354438943f62f282053ed2c8ec8c9cbdcb7929 100644 (file)
@@ -289,7 +289,7 @@ static struct bfd_link_hash_table*
 elf64_hppa_hash_table_create (bfd *abfd)
 {
   struct elf64_hppa_link_hash_table *htab;
-  bfd_size_type amt = sizeof (*htab);
+  size_t amt = sizeof (*htab);
 
   htab = bfd_zmalloc (amt);
   if (htab == NULL)
index ffdd84c52f8e5493d5097c6a39c30a341fc02172..bdb038b23abc29f165a271d1be0a68130376d439 100644 (file)
@@ -4374,7 +4374,7 @@ elf64_ia64_object_p (bfd *abfd)
   flagword flags;
   const char *name;
   char *unwi_name, *unw_name;
-  bfd_size_type amt;
+  size_t amt;
 
   if (abfd->flags & DYNAMIC)
     return TRUE;
index 371d69847a233d25b053074c9b140f3f6e7bf63f..2c936badf541fab0d48b39d40e2c6827cd23959a 100644 (file)
@@ -831,7 +831,7 @@ mmix_elf_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       struct _mmix_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
index 2bc0f9da108396c673a6efe4052ab11dfea89904..1ea4c402e041c8c5b3a304a5b8c032a98eead42a 100644 (file)
@@ -2000,7 +2000,7 @@ ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       struct _ppc64_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
@@ -3435,7 +3435,7 @@ static struct bfd_link_hash_table *
 ppc64_elf_link_hash_table_create (bfd *abfd)
 {
   struct ppc_link_hash_table *htab;
-  bfd_size_type amt = sizeof (struct ppc_link_hash_table);
+  size_t amt = sizeof (struct ppc_link_hash_table);
 
   htab = bfd_zmalloc (amt);
   if (htab == NULL)
@@ -4431,7 +4431,7 @@ update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
          break;
       if (ent == NULL)
        {
-         bfd_size_type amt = sizeof (*ent);
+         size_t amt = sizeof (*ent);
          ent = bfd_alloc (abfd, amt);
          if (ent == NULL)
            return FALSE;
@@ -4463,7 +4463,7 @@ update_plt_info (bfd *abfd, struct plt_entry **plist, bfd_vma addend)
       break;
   if (ent == NULL)
     {
-      bfd_size_type amt = sizeof (*ent);
+      size_t amt = sizeof (*ent);
       ent = bfd_alloc (abfd, amt);
       if (ent == NULL)
        return FALSE;
@@ -4741,7 +4741,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
                  break;
              if (ent == NULL)
                {
-                 bfd_size_type amt = sizeof (*ent);
+                 size_t amt = sizeof (*ent);
                  ent = bfd_alloc (abfd, amt);
                  if (ent == NULL)
                    return FALSE;
@@ -12216,7 +12216,7 @@ int
 ppc64_elf_setup_section_lists (struct bfd_link_info *info)
 {
   unsigned int id;
-  bfd_size_type amt;
+  size_t amt;
   struct ppc_link_hash_table *htab = ppc_hash_table (info);
 
   if (htab == NULL)
index 60c4a3bd90fcf4f5e1b71e29ad800f5912849460..70fb68a0a2d2fd45f095b4482aee918cd486613e 100644 (file)
@@ -722,7 +722,7 @@ static struct bfd_link_hash_table *
 elf_s390_link_hash_table_create (bfd *abfd)
 {
   struct elf_s390_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_s390_link_hash_table);
+  size_t amt = sizeof (struct elf_s390_link_hash_table);
 
   ret = (struct elf_s390_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -1267,7 +1267,7 @@ elf_s390_check_relocs (bfd *abfd,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
                  if (p == NULL)
index 014bea147541caf686d203f519f3adf616146411..7776d0ec8a6a84652817d5c0645ba71f56eda8fc 100644 (file)
@@ -2294,7 +2294,7 @@ do_size:
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
 
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
index 3add9f18bd7e940f6e4874e875e09b2b6f50a17d..f7b867ca7bee3f8ea87b05921cd7076ad2e349e4 100644 (file)
@@ -747,7 +747,7 @@ bfd_elf_link_record_local_dynamic_symbol (struct bfd_link_info *info,
                                          bfd *input_bfd,
                                          long input_indx)
 {
-  bfd_size_type amt;
+  size_t amt;
   struct elf_link_local_dynamic_entry *entry;
   struct elf_link_hash_table *eht;
   struct elf_strtab_hash *dynstr;
@@ -2155,7 +2155,7 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h,
   struct elf_find_verdep_info *rinfo = (struct elf_find_verdep_info *) data;
   Elf_Internal_Verneed *t;
   Elf_Internal_Vernaux *a;
-  bfd_size_type amt;
+  size_t amt;
 
   /* We only care about symbols defined in shared objects with version
      information.  */
@@ -3919,7 +3919,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
   const struct elf_backend_data *bed;
   bfd_boolean add_needed;
   struct elf_link_hash_table *htab;
-  bfd_size_type amt;
   void *alloc_mark = NULL;
   struct bfd_hash_entry **old_table = NULL;
   unsigned int old_size = 0;
@@ -4127,8 +4126,8 @@ error_free_dyn:
                  struct bfd_link_needed_list *n, **pn;
                  char *fnm, *anm;
                  unsigned int tagv = dyn.d_un.d_val;
+                 size_t amt = sizeof (struct bfd_link_needed_list);
 
-                 amt = sizeof (struct bfd_link_needed_list);
                  n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
                  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
                  if (n == NULL || fnm == NULL)
@@ -4150,8 +4149,8 @@ error_free_dyn:
                  struct bfd_link_needed_list *n, **pn;
                  char *fnm, *anm;
                  unsigned int tagv = dyn.d_un.d_val;
+                 size_t amt = sizeof (struct bfd_link_needed_list);
 
-                 amt = sizeof (struct bfd_link_needed_list);
                  n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
                  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
                  if (n == NULL || fnm == NULL)
@@ -4176,8 +4175,8 @@ error_free_dyn:
                  struct bfd_link_needed_list *n, **pn;
                  char *fnm, *anm;
                  unsigned int tagv = dyn.d_un.d_val;
+                 size_t amt = sizeof (struct bfd_link_needed_list);
 
-                 amt = sizeof (struct bfd_link_needed_list);
                  n = (struct bfd_link_needed_list *) bfd_alloc (abfd, amt);
                  fnm = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
                  if (n == NULL || fnm == NULL)
@@ -4311,8 +4310,7 @@ error_free_dyn:
        {
          /* We store a pointer to the hash table entry for each
             external symbol.  */
-         amt = extsymcount;
-         amt *= sizeof (struct elf_link_hash_entry *);
+         size_t amt = extsymcount * sizeof (struct elf_link_hash_entry *);
          sym_hash = (struct elf_link_hash_entry **) bfd_zalloc (abfd, amt);
          if (sym_hash == NULL)
            goto error_free_sym;
@@ -4331,17 +4329,16 @@ error_free_dyn:
         to internal format.  */
       if (elf_dynversym (abfd) != 0)
        {
-         Elf_Internal_Shdr *versymhdr;
+         Elf_Internal_Shdr *versymhdr = &elf_tdata (abfd)->dynversym_hdr;
+         bfd_size_type amt = versymhdr->sh_size;
 
-         versymhdr = &elf_tdata (abfd)->dynversym_hdr;
-         amt = versymhdr->sh_size;
          extversym = (Elf_External_Versym *) bfd_malloc (amt);
          if (extversym == NULL)
            goto error_free_sym;
          if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0
              || bfd_bread (extversym, amt, abfd) != amt)
            goto error_free_vers;
-         extversym_end = extversym + (amt / sizeof (* extversym));
+         extversym_end = extversym + amt / sizeof (*extversym);
        }
     }
 
@@ -5056,8 +5053,8 @@ error_free_dyn:
                     aliases can be checked.  */
                  if (!nondeflt_vers)
                    {
-                     amt = ((isymend - isym + 1)
-                            * sizeof (struct elf_link_hash_entry *));
+                     size_t amt = ((isymend - isym + 1)
+                                   * sizeof (struct elf_link_hash_entry *));
                      nondeflt_vers
                        = (struct elf_link_hash_entry **) bfd_malloc (amt);
                      if (!nondeflt_vers)
@@ -5312,6 +5309,7 @@ error_free_dyn:
        {
          struct elf_link_hash_entry *h = nondeflt_vers[cnt], *hi;
          char *shortname, *p;
+         size_t amt;
 
          p = strchr (h->root.root.string, ELF_VER_CHR);
          if (p == NULL
@@ -5372,13 +5370,12 @@ error_free_dyn:
       struct elf_link_hash_entry **hppend;
       struct elf_link_hash_entry **sorted_sym_hash;
       struct elf_link_hash_entry *h;
-      size_t sym_count;
+      size_t sym_count, amt;
 
       /* Since we have to search the whole symbol list for each weak
         defined symbol, search time for N weak defined symbols will be
         O(N^2). Binary search will cut it down to O(NlogN).  */
-      amt = extsymcount;
-      amt *= sizeof (*sorted_sym_hash);
+      amt = extsymcount * sizeof (*sorted_sym_hash);
       sorted_sym_hash = bfd_malloc (amt);
       if (sorted_sym_hash == NULL)
        goto error_return;
@@ -5653,7 +5650,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
   unsigned char *included = NULL;
   carsym *symdefs;
   bfd_boolean loop;
-  bfd_size_type amt;
+  size_t amt;
   const struct elf_backend_data *bed;
   struct elf_link_hash_entry * (*archive_symbol_lookup)
     (bfd *, struct bfd_link_info *, const char *);
@@ -5673,8 +5670,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
   c = bfd_ardata (abfd)->symdef_count;
   if (c == 0)
     return TRUE;
-  amt = c;
-  amt *= sizeof (*included);
+  amt = c * sizeof (*included);
   included = (unsigned char *) bfd_zmalloc (amt);
   if (included == NULL)
     return FALSE;
@@ -7692,7 +7688,7 @@ struct bfd_link_hash_table *
 _bfd_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_link_hash_table);
+  size_t amt = sizeof (struct elf_link_hash_table);
 
   ret = (struct elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -7846,7 +7842,7 @@ bfd_elf_get_bfd_needed_list (bfd *abfd,
          const char *string;
          struct bfd_link_needed_list *l;
          unsigned int tagv = dyn.d_un.d_val;
-         bfd_size_type amt;
+         size_t amt;
 
          string = bfd_elf_string_from_elf_section (abfd, shlink, tagv);
          if (string == NULL)
@@ -9548,7 +9544,7 @@ static bfd_boolean
 elf_link_swap_symbols_out (struct elf_final_link_info *flinfo)
 {
   struct elf_link_hash_table *hash_table = elf_hash_table (flinfo->info);
-  bfd_size_type amt;
+  size_t amt;
   size_t i;
   const struct elf_backend_data *bed;
   bfd_byte *symbuf;
index 5fabcd8f6462730aef10ec942b594d589759994e..2191b5d470dcdf2bf3b84c11a3f4f503ef838128 100644 (file)
@@ -2947,7 +2947,7 @@ static struct bfd_link_hash_table *
 elfNN_aarch64_link_hash_table_create (bfd *abfd)
 {
   struct elf_aarch64_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct elf_aarch64_link_hash_table);
+  size_t amt = sizeof (struct elf_aarch64_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -3456,7 +3456,7 @@ elfNN_aarch64_setup_section_lists (bfd *output_bfd,
   unsigned int top_id, top_index;
   asection *section;
   asection **input_list, **list;
-  bfd_size_type amt;
+  size_t amt;
   struct elf_aarch64_link_hash_table *htab =
     elf_aarch64_hash_table (info);
 
@@ -7853,7 +7853,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info,
            p = *head;
            if (p == NULL || p->sec != sec)
              {
-               bfd_size_type amt = sizeof *p;
+               size_t amt = sizeof *p;
                p = ((struct elf_dyn_relocs *)
                     bfd_zalloc (htab->root.dynobj, amt));
                if (p == NULL)
@@ -8419,7 +8419,7 @@ elfNN_aarch64_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       _aarch64_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
index 2ba9608e34973a653e453891c3d3cf8ddc73d6fe..559889d87714f18a85537800d4b019313e5386d2 100644 (file)
@@ -4883,7 +4883,7 @@ elfNN_ia64_object_p (bfd *abfd)
   flagword flags;
   const char *name;
   char *unwi_name, *unw_name;
-  bfd_size_type amt;
+  size_t amt;
 
   if (abfd->flags & DYNAMIC)
     return TRUE;
index 40d01a8e36d98a8f063d782ef393ad29fbec5381..d639501fc509ab7b65e28519f7343977c1d2108e 100644 (file)
@@ -269,7 +269,7 @@ static struct bfd_link_hash_table *
 riscv_elf_link_hash_table_create (bfd *abfd)
 {
   struct riscv_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct riscv_elf_link_hash_table);
+  size_t amt = sizeof (struct riscv_elf_link_hash_table);
 
   ret = (struct riscv_elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -724,7 +724,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
                  if (p == NULL)
index d7e3aed3b6760c09044a33a805e6a73279b00e77..a05c67154cff3ac54df54127113ac8280b8a7aef 100644 (file)
@@ -1374,7 +1374,7 @@ _bfd_mips_elf_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       struct _mips_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
@@ -7830,7 +7830,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
        {
          asymbol *elf_text_symbol;
          asection *elf_text_section;
-         bfd_size_type amt = sizeof (asection);
+         size_t amt = sizeof (asection);
 
          elf_text_section = bfd_zalloc (abfd, amt);
          if (elf_text_section == NULL)
@@ -7871,7 +7871,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
        {
          asymbol *elf_data_symbol;
          asection *elf_data_section;
-         bfd_size_type amt = sizeof (asection);
+         size_t amt = sizeof (asection);
 
          elf_data_section = bfd_zalloc (abfd, amt);
          if (elf_data_section == NULL)
@@ -12549,7 +12549,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
 {
   asection *s;
   struct elf_segment_map *m, **pm;
-  bfd_size_type amt;
+  size_t amt;
 
   /* If there is a .reginfo section, we need a PT_MIPS_REGINFO
      segment.  */
@@ -12752,7 +12752,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
                && s->vma + s->size <= high)
              ++c;
 
-         amt = sizeof *n + (bfd_size_type) (c - 1) * sizeof (asection *);
+         amt = sizeof *n - sizeof (asection *) + c * sizeof (asection *);
          n = bfd_zalloc (abfd, amt);
          if (n == NULL)
            return FALSE;
@@ -13203,7 +13203,7 @@ _bfd_mips_elf_set_section_contents (bfd *abfd, sec_ptr section,
 
       if (elf_section_data (section) == NULL)
        {
-         bfd_size_type amt = sizeof (struct bfd_elf_section_data);
+         size_t amt = sizeof (struct bfd_elf_section_data);
          section->used_by_bfd = bfd_zalloc (abfd, amt);
          if (elf_section_data (section) == NULL)
            return FALSE;
@@ -14285,7 +14285,7 @@ struct bfd_link_hash_table *
 _bfd_mips_elf_link_hash_table_create (bfd *abfd)
 {
   struct mips_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct mips_elf_link_hash_table);
+  size_t amt = sizeof (struct mips_elf_link_hash_table);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
index e1e34a56e289f939d493e7e58e5aed0815775825..510e77cb66e176563c594716362c4e27a519712f 100644 (file)
@@ -1136,7 +1136,7 @@ struct bfd_link_hash_table *
 _bfd_sparc_elf_link_hash_table_create (bfd *abfd)
 {
   struct _bfd_sparc_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct _bfd_sparc_elf_link_hash_table);
+  size_t amt = sizeof (struct _bfd_sparc_elf_link_hash_table);
 
   ret = (struct _bfd_sparc_elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -1811,7 +1811,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
                  if (p == NULL)
@@ -2770,7 +2770,7 @@ _bfd_sparc_elf_new_section_hook (bfd *abfd, asection *sec)
   if (!sec->used_by_bfd)
     {
       struct _bfd_sparc_elf_section_data *sdata;
-      bfd_size_type amt = sizeof (*sdata);
+      size_t amt = sizeof (*sdata);
 
       sdata = bfd_zalloc (abfd, amt);
       if (sdata == NULL)
index 7887fef2001732a5f4c1c3f6db14500a16b56ae3..3f063d0929e4d0cb3a76faa86924240db4cb4574 100644 (file)
@@ -1369,7 +1369,7 @@ struct bfd_link_hash_table *
 tilegx_elf_link_hash_table_create (bfd *abfd)
 {
   struct tilegx_elf_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct tilegx_elf_link_hash_table);
+  size_t amt = sizeof (struct tilegx_elf_link_hash_table);
 
   ret = (struct tilegx_elf_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
@@ -2031,7 +2031,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
              p = *head;
              if (p == NULL || p->sec != sec)
                {
-                 bfd_size_type amt = sizeof *p;
+                 size_t amt = sizeof *p;
                  p = ((struct elf_dyn_relocs *)
                       bfd_alloc (htab->elf.dynobj, amt));
                  if (p == NULL)
index fc783b0e988252bdc9f2a9d717510fe4db02f8f8..988e55747e36e786b364af053a13f6c4078e4f83 100644 (file)
@@ -756,7 +756,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd)
 {
   struct elf_x86_link_hash_table *ret;
   const struct elf_backend_data *bed;
-  bfd_size_type amt = sizeof (struct elf_x86_link_hash_table);
+  size_t amt = sizeof (struct elf_x86_link_hash_table);
 
   ret = (struct elf_x86_link_hash_table *) bfd_zmalloc (amt);
   if (ret == NULL)
index a80a175b8ae90b9c377a9f0bd5a3d578c1d36ec0..659d407018b81e791dd1231ec38c39afbbd1c278 100644 (file)
@@ -236,7 +236,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
 
   if (matching != NULL || *bfd_associated_vector != NULL)
     {
-      bfd_size_type amt;
+      size_t amt;
 
       amt = sizeof (*matching_vector) * 2 * _bfd_target_vector_entries;
       matching_vector = (const bfd_target **) bfd_malloc (amt);
index 8dd130aaff0b95dbe2de9f2484205e933e765d62..56d18ac317945a8bdd2d17166cf32e7ec0c595bf 100644 (file)
@@ -762,7 +762,7 @@ struct bfd_strtab_hash *
 _bfd_stringtab_init (void)
 {
   struct bfd_strtab_hash *table;
-  bfd_size_type amt = sizeof (* table);
+  size_t amt = sizeof (* table);
 
   table = (struct bfd_strtab_hash *) bfd_malloc (amt);
   if (table == NULL)
index 4c8c249032abef789ed3e7e456532dc8cf6f552d..958a84b50705899d7816161146238bd7064a41e5 100644 (file)
@@ -357,7 +357,7 @@ ihex_scan (bfd *abfd)
                {
                  char secbuf[20];
                  char *secname;
-                 bfd_size_type amt;
+                 size_t amt;
                  flagword flags;
 
                  sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
index 80cd5f83a24050b4976b0971ad831641c271b471..7b214e0a0a3129ce19b0241ece61be35a1506efd 100644 (file)
@@ -172,7 +172,7 @@ irix_core_core_file_p (bfd *abfd)
   int val;
   struct coreout coreout;
   struct idesc *idg, *idf, *ids;
-  bfd_size_type amt;
+  size_t amt;
 
   val = bfd_bread (&coreout, (bfd_size_type) sizeof coreout, abfd);
   if (val != sizeof coreout)
index d8703179e5b10d8374388c1ee2b07cd8eabe7d01..c523f8b5c649730c04cedbbe8cb8da0cd8805f86 100644 (file)
@@ -536,7 +536,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
                              bfd_boolean copy,
                              bfd_boolean follow)
 {
-  bfd_size_type amt;
+  size_t amt;
 
   if (info->wrap_hash != NULL)
     {
@@ -764,7 +764,7 @@ struct bfd_link_hash_table *
 _bfd_generic_link_hash_table_create (bfd *abfd)
 {
   struct generic_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct generic_link_hash_table);
+  size_t amt = sizeof (struct generic_link_hash_table);
 
   ret = (struct generic_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
@@ -2422,7 +2422,7 @@ _bfd_generic_reloc_link_order (bfd *abfd,
 struct bfd_link_order *
 bfd_new_link_order (bfd *abfd, asection *section)
 {
-  bfd_size_type amt = sizeof (struct bfd_link_order);
+  size_t amt = sizeof (struct bfd_link_order);
   struct bfd_link_order *new_lo;
 
   new_lo = (struct bfd_link_order *) bfd_zalloc (abfd, amt);
index 57cd89748e1a16d94225f943482ebdc0348c6614..ef47c8359c732de06799612924703bc0572f26b9 100644 (file)
@@ -94,7 +94,7 @@ lynx_core_file_p (bfd *abfd)
   core_st_t *threadp;
   int pagesize;
   asection *newsect;
-  bfd_size_type amt;
+  size_t amt;
 
   pagesize = getpagesize ();   /* Serious cross-target issue here...  This
                                   really needs to come from a system-specific
index c0fb4c86f15b261698b874065e2fe1a9dffc201e..ae88fd6f74165017b92186e2e45f79a1ee6e0885 100644 (file)
@@ -60,7 +60,7 @@ netbsd_core_file_p (bfd *abfd)
   asection *asect;
   struct core core;
   struct coreseg coreseg;
-  bfd_size_type amt = sizeof core;
+  size_t amt = sizeof core;
 
   val = bfd_bread (&core, amt, abfd);
   if (val != sizeof core)
index 87cebc625d9f1b14716fe1ca4dceff84c09bde3a..19cd4f2b75fbee8220c732aa3020abc5c3b4fbc2 100644 (file)
@@ -77,7 +77,7 @@ osf_core_core_file_p (bfd *abfd)
   int i;
   char *secname;
   struct core_filehdr core_header;
-  bfd_size_type amt;
+  size_t amt;
 
   amt = sizeof core_header;
   val = bfd_bread (& core_header, amt, abfd);
index 1ab303336384fec85e53d44562d900f5e9e9e376..cd14e87b962c39cfe651a4c4ce0f1dffe8d5faa3 100644 (file)
@@ -459,7 +459,7 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
 {
   struct aout_data_struct *rawptr, *oldrawptr;
   const bfd_target *result;
-  bfd_size_type amt = sizeof (struct aout_data_struct);
+  size_t amt = sizeof (struct aout_data_struct);
 
   rawptr = bfd_zalloc (abfd, amt);
   if (rawptr == NULL)
@@ -647,7 +647,7 @@ bfd_boolean
 NAME (aout, mkobject) (bfd *abfd)
 {
   struct aout_data_struct  *rawptr;
-  bfd_size_type amt = sizeof (struct aout_data_struct);
+  size_t amt = sizeof (struct aout_data_struct);
 
   bfd_set_error (bfd_error_system_call);
 
@@ -1413,7 +1413,7 @@ translate_to_native_sym_flags (bfd *abfd,
 asymbol *
 NAME (aout, make_empty_symbol) (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (aout_symbol_type);
+  size_t amt = sizeof (aout_symbol_type);
   aout_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt);
 
   if (!new_symbol_type)
@@ -2443,7 +2443,7 @@ struct bfd_link_hash_table *
 NAME (aout, link_hash_table_create) (bfd *abfd)
 {
   struct aout_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct aout_link_hash_table);
+  size_t amt = sizeof (struct aout_link_hash_table);
 
   ret = bfd_malloc (amt);
   if (ret == NULL)
@@ -2889,7 +2889,7 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data)
   bfd_vma val;
   struct external_nlist outsym;
   bfd_size_type indx;
-  bfd_size_type amt;
+  size_t amt;
 
   if (h->root.type == bfd_link_hash_warning)
     {
index d9bf0e46236e84472a213a8c3a9b27dd80d69bc1..e42d646552a0ca1e856e082256cd3d943b54ddf0 100644 (file)
@@ -3138,7 +3138,7 @@ _bfd_XX_bfd_copy_private_section_data (bfd *ibfd,
     {
       if (coff_section_data (obfd, osec) == NULL)
        {
-         bfd_size_type amt = sizeof (struct coff_section_tdata);
+         size_t amt = sizeof (struct coff_section_tdata);
          osec->used_by_bfd = bfd_zalloc (obfd, amt);
          if (osec->used_by_bfd == NULL)
            return FALSE;
@@ -3146,7 +3146,7 @@ _bfd_XX_bfd_copy_private_section_data (bfd *ibfd,
 
       if (pei_section_data (obfd, osec) == NULL)
        {
-         bfd_size_type amt = sizeof (struct pei_section_tdata);
+         size_t amt = sizeof (struct pei_section_tdata);
          coff_section_data (obfd, osec)->tdata = bfd_zalloc (obfd, amt);
          if (coff_section_data (obfd, osec)->tdata == NULL)
            return FALSE;
index ed0c544d856581635af37eb9b12a0c15fdca291f..c1bc81b169aae5fcdc0f5192ba2d8e478fb95bec 100644 (file)
@@ -257,7 +257,7 @@ static bfd_boolean
 pe_mkobject (bfd * abfd)
 {
   pe_data_type *pe;
-  bfd_size_type amt = sizeof (pe_data_type);
+  size_t amt = sizeof (pe_data_type);
 
   abfd->tdata.pe_obj_data = (struct pe_tdata *) bfd_zalloc (abfd, amt);
 
index e1fa7041fd3c851cab2c7bdb70d4de265e4321ec..24f3e0655e523f3490fa7a16c9f72ebc3d64e250 100644 (file)
@@ -102,7 +102,7 @@ ppcboot_mkobject (bfd *abfd)
 {
   if (!ppcboot_get_tdata (abfd))
     {
-      bfd_size_type amt = sizeof (ppcboot_data_t);
+      size_t amt = sizeof (ppcboot_data_t);
       ppcboot_set_tdata (abfd, bfd_zalloc (abfd, amt));
     }
 
@@ -276,7 +276,7 @@ ppcboot_canonicalize_symtab (bfd *abfd, asymbol **alocation)
   asection *sec = ppcboot_get_tdata (abfd)->sec;
   asymbol *syms;
   unsigned int i;
-  bfd_size_type amt = PPCBOOT_SYMS * sizeof (asymbol);
+  size_t amt = PPCBOOT_SYMS * sizeof (asymbol);
 
   syms = (asymbol *) bfd_alloc (abfd, amt);
   if (syms == NULL)
index ae8d747c2be80634e0499c57988d9c9d82876895..48a9b1c669e9a02c4fc0cf9f673c0c8e75ee5603 100644 (file)
@@ -61,7 +61,7 @@ ptrace_unix_core_file_p (bfd *abfd)
   int val;
   struct ptrace_user u;
   struct trad_core_struct *rawptr;
-  bfd_size_type amt;
+  size_t amt;
   flagword flags;
 
   val = bfd_bread ((void *)&u, (bfd_size_type) sizeof u, abfd);
index 766bbca09bb38f44a97c46be05bc787c6a7c3771..a9afbbacd9af3cf7467ed6627605211cd58d7424 100644 (file)
@@ -71,7 +71,7 @@ static struct user *
 read_uarea (bfd *abfd, int filepos)
 {
   struct sco5_core_struct *rawptr;
-  bfd_size_type amt = sizeof (struct sco5_core_struct);
+  size_t amt = sizeof (struct sco5_core_struct);
 
   rawptr = (struct sco5_core_struct *) bfd_zmalloc (amt);
   if (rawptr == NULL)
index 8e8960ed83f36db237fe5bb117243479b74e5127..cbe970f59a066cfe8ec51e375f332df26a6babf9 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -1425,7 +1425,7 @@ hppa_som_gen_reloc_type (bfd *abfd,
       /* The difference of two symbols needs *very* special handling.  */
       if (sym_diff)
        {
-         bfd_size_type amt = sizeof (int);
+         size_t amt = sizeof (int);
 
          final_types[0] = bfd_alloc (abfd, amt);
          final_types[1] = bfd_alloc (abfd, amt);
@@ -1509,7 +1509,7 @@ hppa_som_gen_reloc_type (bfd *abfd,
       /* The difference of two symbols needs *very* special handling.  */
       if (sym_diff)
        {
-         bfd_size_type amt = sizeof (int);
+         size_t amt = sizeof (int);
 
          final_types[0] = bfd_alloc (abfd, amt);
          final_types[1] = bfd_alloc (abfd, amt);
@@ -1548,7 +1548,7 @@ hppa_som_gen_reloc_type (bfd *abfd,
        /* If we have short and long pcrel modes, then generate the proper
           mode selector, then the pcrel relocation.  Redundant selectors
           will be eliminated as the relocs are sized and emitted.  */
-       bfd_size_type amt = sizeof (int);
+       size_t amt = sizeof (int);
 
        final_types[0] = bfd_alloc (abfd, amt);
        if (!final_types[0])
@@ -2393,7 +2393,7 @@ som_object_p (bfd *abfd)
   unsigned long current_offset = 0;
   struct som_external_lst_header ext_lst_header;
   struct som_external_som_entry ext_som_entry;
-  bfd_size_type amt;
+  size_t amt;
   unsigned int loc;
 #define ENTRY_SIZE sizeof (struct som_external_som_entry)
 
@@ -2548,7 +2548,7 @@ som_prep_headers (bfd *abfd)
 {
   struct som_header *file_hdr;
   asection *section;
-  bfd_size_type amt = sizeof (struct som_header);
+  size_t amt = sizeof (struct som_header);
 
   /* Make and attach a file header to the BFD.  */
   file_hdr = bfd_zalloc (abfd, amt);
@@ -2907,7 +2907,7 @@ som_write_fixups (bfd *abfd,
   unsigned int subspace_reloc_size = 0;
   unsigned int num_spaces = obj_som_file_hdr (abfd)->space_total;
   asection *section = abfd->sections;
-  bfd_size_type amt;
+  size_t amt;
 
   memset (tmp_space, 0, SOM_TMP_BUFSIZE);
   p = tmp_space;
@@ -3313,7 +3313,7 @@ som_write_space_strings (bfd *abfd,
   char *p = tmp_space;
   unsigned int strings_size = 0;
   asection *section;
-  bfd_size_type amt;
+  size_t amt;
   bfd_size_type res;
 
   if (tmp_space == NULL)
@@ -3425,7 +3425,7 @@ som_write_symbol_strings (bfd *abfd,
   char *tmp_space = bfd_malloc (tmp_space_size);
   char *p = tmp_space;
   unsigned int strings_size = 0;
-  bfd_size_type amt;
+  size_t amt;
   bfd_size_type res;
 
   if (tmp_space == NULL)
@@ -3955,7 +3955,7 @@ som_finish_writing (bfd *abfd)
   asection *section;
   unsigned long current_offset;
   unsigned int strings_size, total_reloc_size;
-  bfd_size_type amt;
+  size_t amt;
   struct som_external_header ext_header;
 
   /* We must set up the version identifier here as objcopy/strip copy
@@ -4841,7 +4841,7 @@ som_canonicalize_symtab (bfd *abfd, asymbol **location)
 static asymbol *
 som_make_empty_symbol (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (som_symbol_type);
+  size_t amt = sizeof (som_symbol_type);
   som_symbol_type *new_symbol_type = bfd_zalloc (abfd, amt);
 
   if (new_symbol_type == NULL)
@@ -5371,7 +5371,7 @@ som_new_section_hook (bfd *abfd, asection *newsect)
 {
   if (!newsect->used_by_bfd)
     {
-      bfd_size_type amt = sizeof (struct som_section_data_struct);
+      size_t amt = sizeof (struct som_section_data_struct);
 
       newsect->used_by_bfd = bfd_zalloc (abfd, amt);
       if (!newsect->used_by_bfd)
@@ -5417,7 +5417,7 @@ som_bfd_copy_private_section_data (bfd *ibfd,
                                   bfd *obfd,
                                   asection *osection)
 {
-  bfd_size_type amt;
+  size_t amt;
 
   /* One day we may try to grok other private data.  */
   if (ibfd->xvec->flavour != bfd_target_som_flavour
@@ -5525,7 +5525,7 @@ bfd_som_set_section_attributes (asection *section,
   /* Allocate memory to hold the magic information.  */
   if (som_section_data (section)->copy_data == NULL)
     {
-      bfd_size_type amt = sizeof (struct som_copyable_section_data_struct);
+      size_t amt = sizeof (struct som_copyable_section_data_struct);
 
       som_section_data (section)->copy_data = bfd_zalloc (section->owner, amt);
       if (som_section_data (section)->copy_data == NULL)
@@ -5555,7 +5555,7 @@ bfd_som_set_subsection_attributes (asection *section,
   /* Allocate memory to hold the magic information.  */
   if (som_section_data (section)->copy_data == NULL)
     {
-      bfd_size_type amt = sizeof (struct som_copyable_section_data_struct);
+      size_t amt = sizeof (struct som_copyable_section_data_struct);
 
       som_section_data (section)->copy_data = bfd_zalloc (section->owner, amt);
       if (som_section_data (section)->copy_data == NULL)
@@ -5589,7 +5589,7 @@ bfd_som_set_symbol_type (asymbol *symbol, unsigned int type)
 bfd_boolean
 bfd_som_attach_aux_hdr (bfd *abfd, int type, char *string)
 {
-  bfd_size_type amt;
+  size_t amt;
 
   if (type == VERSION_AUX_ID)
     {
@@ -6602,7 +6602,7 @@ som_write_armap (bfd *abfd,
   struct ar_hdr hdr;
   struct som_external_lst_header lst;
   unsigned char *p;
-  bfd_size_type amt;
+  size_t amt;
   unsigned int csum;
   unsigned int module_count;
 
index a370b775bc90c0d89906a991c681a3adf599474e..266c2b19ebbcd82f25fa09bd6d8c08b40d3ea5f4 100644 (file)
@@ -550,7 +550,7 @@ srec_scan (bfd *abfd)
                  {
                    char secbuf[20];
                    char *secname;
-                   bfd_size_type amt;
+                   size_t amt;
                    flagword flags;
 
                    sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
index 128cf191453c116732339c0461fcda19c6421a30..8a5c89767a88cac997678e984f1d5665d3938068 100644 (file)
@@ -538,7 +538,7 @@ DESCRIPTION
 asymbol *
 _bfd_generic_make_empty_symbol (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (asymbol);
+  size_t amt = sizeof (asymbol);
   asymbol *new_symbol = (asymbol *) bfd_zalloc (abfd, amt);
   if (new_symbol)
     new_symbol->the_bfd = abfd;
index 1b7e29d1e6eb8c7c7058a42c7a7e8678fe2f5670..e7cd9a810cb0d1506f8413f565540cd2f8b29d07 100644 (file)
@@ -1711,7 +1711,7 @@ const char **
 bfd_target_list (void)
 {
   int vec_length = 0;
-  bfd_size_type amt;
+  size_t amt;
   const bfd_target * const *target;
   const  char **name_list, **name_ptr;
 
index d7243c4d291370b349049755c065e3f670130f1e..aaaffa05c27819a6ad257fcafae94f8074e48e39 100644 (file)
@@ -428,7 +428,7 @@ first_phase (bfd *abfd, int type, char *src, char * src_end)
            case '8':
              /* Symbols, add to section.  */
              {
-               bfd_size_type amt = sizeof (tekhex_symbol_type);
+               size_t amt = sizeof (tekhex_symbol_type);
                tekhex_symbol_type *new_symbol = (tekhex_symbol_type *)
                    bfd_alloc (abfd, amt);
                char stype = (*src);
@@ -912,7 +912,7 @@ tekhex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
 static asymbol *
 tekhex_make_empty_symbol (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (struct tekhex_symbol_struct);
+  size_t amt = sizeof (struct tekhex_symbol_struct);
   tekhex_symbol_type *new_symbol = (tekhex_symbol_type *) bfd_zalloc (abfd,
                                                                      amt);
 
index 9ae1e53582eabb8985f70da9783c9fa88701dc05..10ab2521344bed8832a28f865c5632d1c03bfc67 100644 (file)
@@ -77,7 +77,7 @@ trad_unix_core_file_p (bfd *abfd)
   int val;
   struct user u;
   struct trad_core_struct *rawptr;
-  bfd_size_type amt;
+  size_t amt;
   flagword flags;
 
 #ifdef TRAD_CORE_USER_OFFSET
index 586a157cb1be9b9e7f68855ab494b6b34633b6b9..b967243bebc1fbfab9785196cd220153a18e858c 100644 (file)
@@ -2656,7 +2656,7 @@ _bfd_vms_slurp_object_records (bfd * abfd)
 static bfd_boolean
 vms_initialize (bfd * abfd)
 {
-  bfd_size_type amt;
+  size_t amt;
 
   amt = sizeof (struct vms_private_data_struct);
   abfd->tdata.any = bfd_zalloc (abfd, amt);
@@ -8457,7 +8457,7 @@ static struct bfd_link_hash_table *
 alpha_vms_bfd_link_hash_table_create (bfd *abfd)
 {
   struct alpha_vms_link_hash_table *ret;
-  bfd_size_type amt = sizeof (struct alpha_vms_link_hash_table);
+  size_t amt = sizeof (struct alpha_vms_link_hash_table);
 
   ret = (struct alpha_vms_link_hash_table *) bfd_malloc (amt);
   if (ret == NULL)
@@ -9424,7 +9424,7 @@ vms_close_and_cleanup (bfd * abfd)
 static bfd_boolean
 vms_new_section_hook (bfd * abfd, asection *section)
 {
-  bfd_size_type amt;
+  size_t amt;
 
   vms_debug2 ((1, "vms_new_section_hook (%p, [%u]%s)\n",
               abfd, section->index, section->name));
index e62f842e12c07f7f6f6cfa96f884b02d746a6cc5..dfd3d873b22435a7077af69be448dcf04ebede3f 100644 (file)
@@ -688,7 +688,7 @@ wasm_canonicalize_symtab (bfd *abfd, asymbol **alocation)
 static asymbol *
 wasm_make_empty_symbol (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (asymbol);
+  size_t amt = sizeof (asymbol);
   asymbol *new_symbol = (asymbol *) bfd_zalloc (abfd, amt);
 
   if (! new_symbol)
index 2a431dbecf9829ffd6c8e0bed86e5a2bb15e92b5..ff4b483703254ace62b2009dc45c6ab1a9849873 100644 (file)
@@ -214,7 +214,7 @@ xcoff_get_section_contents (bfd *abfd, asection *sec)
 {
   if (coff_section_data (abfd, sec) == NULL)
     {
-      bfd_size_type amt = sizeof (struct coff_section_tdata);
+      size_t amt = sizeof (struct coff_section_tdata);
 
       sec->used_by_bfd = bfd_zalloc (abfd, amt);
       if (sec->used_by_bfd == NULL)
@@ -593,7 +593,7 @@ struct bfd_link_hash_table *
 _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd)
 {
   struct xcoff_link_hash_table *ret;
-  bfd_size_type amt = sizeof (* ret);
+  size_t amt = sizeof (* ret);
 
   ret = bfd_zmalloc (amt);
   if (ret == NULL)
@@ -764,7 +764,7 @@ xcoff_set_import_path (struct bfd_link_info *info,
       if (*pp == NULL)
        {
          struct xcoff_import_file *n;
-         bfd_size_type amt = sizeof (* n);
+         size_t amt = sizeof (*n);
 
          n = bfd_alloc (info->output_bfd, amt);
          if (n == NULL)
@@ -2520,7 +2520,7 @@ xcoff_find_function (struct bfd_link_info *info,
     {
       char *fnname;
       struct xcoff_link_hash_entry *hfn;
-      bfd_size_type amt;
+      size_t amt;
 
       amt = strlen (h->root.root.string) + 2;
       fnname = bfd_malloc (amt);
@@ -3044,7 +3044,7 @@ bfd_xcoff_link_record_set (bfd *output_bfd,
 {
   struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
   struct xcoff_link_size_list *n;
-  bfd_size_type amt;
+  size_t amt;
 
   if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
     return TRUE;
@@ -3292,7 +3292,7 @@ static bfd_boolean
 xcoff_build_ldsym (struct xcoff_loader_info *ldinfo,
                   struct xcoff_link_hash_entry *h)
 {
-  bfd_size_type amt;
+  size_t amt;
 
   /* Warn if this symbol is exported but not defined.  */
   if ((h->flags & XCOFF_EXPORT) != 0
@@ -3640,7 +3640,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd,
   bfd *sub;
   struct bfd_strtab_hash *debug_strtab;
   bfd_byte *debug_contents = NULL;
-  bfd_size_type amt;
+  size_t amt;
 
   if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
     {
@@ -4861,7 +4861,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo,
                        {
                          struct xcoff_toc_rel_hash *n;
                          struct xcoff_link_section_info *si;
-                         bfd_size_type amt;
+                         size_t amt;
 
                          amt = sizeof (* n);
                          n = bfd_alloc (flinfo->output_bfd, amt);