aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
AgeCommit message (Collapse)AuthorFilesLines
1995-10-06Mon Sep 25 22:49:32 1995 Andreas Schwab ↵Ken Raeburn1-1/+3
<schwab@issan.informatik.uni-dortmund.de> * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS when the symbol table is empty. * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve space for section symbols, since we don't output them either. (elf_m68k_adjust_dynindx): Removed. * ptrace-core.c (rawptr): Make it a local variable of ptrace_unix_core_file_p. * trad-core.c (rawptr): Likewise, for trad_unix_core_file_p.
1995-10-06 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. ModifyIan Lance Taylor1-16/+14
BFD_JUMP_TABLE_ARCHIVE accordingly. * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare. (_bfd_compute_and_write_armap): Declare. (_bfd_generic_read_ar_hdr): Declare. (_bfd_read_ar_hdr): Define. (_bfd_noarchive_read_ar_hdr): Define. (_bfd_archive_bsd_read_ar_hdr): Define. (_bfd_archive_coff_read_ar_hdr): Define. * archive.c: Change all callers of _bfd_snarf_ar_hdr to call _bfd_read_ar_hdr instead. (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr. (_bfd_compute_and_write_armap): Rename from compute_and_write_armap. Make non-static. Change all callers. * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather than _bfd_snarf_ar_hdr. * aout-target.h (MY_read_ar_hdr): Define if not defined. * ieee.c (ieee_read_ar_hdr): Define. * libecoff.h (_bfd_ecoff_read_ar_hdr): Define. * oasys.c (oasys_read_ar_hdr): Define. * som.c (som_read_ar_hdr): Define. * bfd-in2.h, libbfd.h: Rebuild.
1995-09-12 Extensive minor changes to avoid various gcc warnings. Also:Ian Lance Taylor1-6/+40
* Makefile.in (BFD32_BACKENDS): Remove coff-arm.o. * archures.c (bfd_arch_info_type): Change mach field from long to unsigned long. (bfd_lookup_arch): Change machine parameter from long to unsigned long.
1995-07-04 * archive.c (_bfd_construct_extended_name_table): IfIan Lance Taylor1-8/+11
BFD_TRADITIONAL_FORMAT is set, limit the length of all file names to ar_max_namelen. (bfd_dont_truncate_arname): If BFD_TRADITIONAL_FORMAT is set, call bfd_bsd_truncate_arname. PR 6888.
1995-07-04 * archive.c (_bfd_write_archive_contents): Revert June 1 change.Ian Lance Taylor1-27/+86
1994-10-31 * archive.c (bfd_dont_truncate_arname): Add the ar paddingIan Lance Taylor1-1/+3
character, if there is room for it, even if the name is the maximum length. PR 5859.
1994-10-21 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case forIan Lance Taylor1-40/+79
_construct_extended_name_table. (bfd_target): Add _bfd_construct_extended_name_table. * archive.c (_bfd_archive_bsd_construct_extended_name_table): New function. (_bfd_archive_coff_construct_extended_name_table): New function. (_bfd_construct_extended_name_table): Renamed by adding a leading underscore, and made externally visible. Added trailing_slash argument, and used it instead of elf_style. Changed type of tablen to bfd_size_type *. (_bfd_write_archive_contents): Use BFD_SEND to call construct_extended_name_table. Use the returned name. * libbfd-in.h (_bfd_construct_extended_name_table): Declare. (_bfd_noarchive_construct_extended_name_table): Define. (_bfd_archive_bsd_construct_extended_name_table): Declare. (_bfd_archive_coff_construct_extended_name_table): Declare. * bfd-in2.h: Rebuild. * libbfd.h: Rebuild. * som.c (som_construct_extended_name_table): New static function. * aout-target.h (MY_construct_extended_name_table): Define. * coff-rs6000.c (rs6000coff_construct_extended_name_table): Define. * ieee.c (ieee_construct_extended_name_table): Define. * libecoff.h (_bfd_ecoff_construct_extended_name_table): Define. * oasys.c (oasys_construct_extended_name_table): Define.
1994-08-22 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add _update_armap_timestamp.Ian Lance Taylor1-18/+6
(bfd_target): Add field _bfd_update_armap_timestamp. * bfd.c (bfd_update_armap_timestamp): Define. * bfd-in2.h: Rebuilt. * libbfd-in.h (_bfd_noarchive_update_armap_timestamp): Define. (_bfd_archive_bsd_update_armap_timestamp): Declare. (_bfd_archive_coff_update_armap_timestamp): Define. * libbfd.h: Rebuilt. * archive.c (_bfd_write_archive_contents): Call bfd_update_armap_timestamp instead of checking for a BSD archive and calling bsd_update_armap_timestamp. (_bfd_archive_bsd_update_armap_timestamp): Rename from _bsd_update_armap_timestamp. Don't assume that armap_datepos is already set. * aout-target.h (MY_update_armap_timestamp): Define if not already defined. * coff-rs6000.c (rs6000coff_update_armap_timestamp): Define. * ieee.c (ieee_update_armap_timestamp): Define. * libecoff.h (_bfd_ecoff_update_armap_timestamp): Define. * oasys.c (oasys_update_armap_timestamp): Define. * som.c (som_update_armap_timestamp): Define.
1994-06-20 * Many files: change all bfd_target vectors to be const. ChangeIan Lance Taylor1-1/+1
all uses of bfd_target * to be const bfd_target *. Change bfd_target_vector and bfd_default_vector arrays to be const bfd_target * const *.
1994-06-15 * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well asIan Lance Taylor1-8/+7
__.SYMDEF; the former was used in old Linux archives. From jrs@world.std.com (Rick Sladkey).
1994-04-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor1-33/+77
checks the return value and handled bfd_error correctly. These changes are not itemised.
1994-04-01 * archive.c (_bfd_write_archive_contents): Once we've found anIan Lance Taylor1-1/+6
object, don't bother to look for more when deciding whether to build a map. (compute_and_write_armap): After adding the symbols for a BFD, call bfd_free_cached_info on it.
1994-03-30Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor1-35/+36
Changes to let BFD return an error indication from get_symtab_upper_bound, bfd_canonicalize_symtab, bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now return long instead of unsigned int, and use -1 to indicate an error. Along the way, rename get_symtab_upper_bound to bfd_get_symtab_upper_bound. * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on errors. (bfd_canonicalize_reloc): Likewise. * syms.c (bfd_get_symtab_upper_bound): Renamed from get_symtab_upper_bound. * targets.c (bfd_target): Renamed _get_symtab_upper_bound to _bfd_get_symtab_upper_bound, and changed it and _bfd_canonicalize_symtab and _get_reloc_upper_bound and _bfd_canonicalize_reloc to all return long. * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors. (NAME(aout,canonicalize_reloc)): Likewise. (NAME(aout,get_reloc_upper_bound)): Likewise. (NAME(aout,get_symtab_upper_bound)): Likewise. * bout.c (b_out_canonicalize_reloc): Likewise. (b_out_get_reloc_upper_bound): Likewise. * coffcode.h (coff_canonicalize_reloc): Likewise. * coffgen.c (coff_get_symtab_upper_bound): Likewise. (coff_get_symtab): Likewise. (coff_get_reloc_upper_bound): Likewise. * ecoff.c (ecoff_get_symtab_upper_bound): Likewise. (ecoff_get_symtab): Likewise. (ecoff_canonicalize_reloc): Likewise. * elfcode.h (elf_get_symtab_upper_bound): Likewise. (elf_get_reloc_upper_bound): Likewise. (elf_canonicalize_reloc): Likewise. (elf_get_symtab): Likewise. * hp300hpux.c (MY(get_symtab)): Likewise. (MY(get_symtab_upper_bound)): Likewise. (MY(canonicalize_reloc)): Likewise. * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise. * ieee.c (ieee_slurp_external_symbols): Change return type to boolean. Check for errors from get_symbol. (ieee_slurp_symbol_table): Change return type to boolean. Check for errors from ieee_slurp_external_symbols. (ieee_get_symtab_upper_bound): Return long, and -1 on errors. (ieee_get_symtab): Likewise. (ieee_get_reloc_upper_bound): Likewise. (ieee_canonicalize_reloc): Likewise. * mipsbsd.c (MY(canonicalize_reloc)): Likewise. * nlmcode.h (nlm_get_symtab_upper_bound): Likewise. (nlm_get_symtab): Likewise. (nlm_get_reloc_upper_bound): Likewise. (nlm_canonicalize_reloc): Likewise. * oasys.c (oasys_get_symtab_upper_bound): Likewise. (oasys_get_symtab): Likewise. (oasys_get_reloc_upper_bound): Likewise. (oasys_canonicalize_reloc): Likewise. * som.c (som_get_symtab_upper_bound): Likewise. (som_get_symtab): Likewise. (som_get_reloc_upper_bound): Likewise. (som_canonicalize_reloc): Likewise. * srec.c (srec_get_symtab_upper_bound): Likewise. (srec_get_symtab): Likewise. (srec_get_reloc_upper_bound): Define as bfd_0l. (srec_canonicalize_reloc): Likewise. * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors. (tekhex_get_symtab_upper_bound): Likewise. (tekhex_get_reloc_upper_bound): Define as bfd_0l. (tekhex_canonicalize_reloc): Likewise. * libaout.h (NAME(aout,get_symtab_upper_bound)): Change declaration to return long. (NAME(aout,get_symtab)): Likewise. (NAME(aout,canonicalize_reloc)): Likewise. (NAME(aout,get_reloc_upper_bound)): Likewise. * libcoff-in.h (coff_get_symtab_upper_bound): Likewise. (coff_get_symtab): Likewise. (coff_get_reloc_upper_bound): Likewise. * libecoff.h (ecoff_get_symtab_upper_bound): Likewise. (ecoff_get_symtab): Likewise. (ecoff_canonicalize_reloc): Likewise. * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise. (bfd_elf32_get_symtab): Likewise. (bfd_elf32_get_reloc_upper_bound): Likewise. (bfd_elf32_canonicalize_reloc): Likewise. (bfd_elf64_get_symtab_upper_bound): Likewise. (bfd_elf64_get_symtab): Likewise. (bfd_elf64_get_reloc_upper_bound): Likewise. (bfd_elf64_canonicalize_reloc): Likewise. * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise. (nlmNAME(get_symtab)): Likewise. (nlmNAME(get_reloc_upper_bound)): Likewise. (nlmNAME(canonicalize_reloc)): Likewise. * archive.c (compute_and_write_armap): Use error_return and no_memory_return labels rather than freeing information in various places. Change storage, symcount and src_count to long. Check errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * bout.c (b_out_relax_section): Change reloc_size to long. Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. (b_out_get_relocated_section_contents): Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise. * elf32-mips.c: Likewise. * elf32-hppa.c (hppa_elf_stub_finish): Likewise. (hppa_look_for_stubs_in_section): Check for errors from bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and bfd_canonicalize_reloc. * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * linker.c (generic_link_read_symbols): Likewise. (_bfd_generic_final_link): Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * reloc16.c (bfd_coff_reloc16_relax_section): Likewise. (bfd_coff_reloc16_get_relocated_section_contents): Likewise. * libbfd.c (bfd_0l): New function. * libbfd-in.h (bfd_0l): Declare. * aix386-core.c: Change get_symtab_upper_bound, get_symtab, get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather than bfd_0u. * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise. * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt. * libcoff.h: Rebuilt. * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables temp and name.
1994-03-26 * libbfd.c (bfd_read): Set bfd_error as appropriate for a shortJeff Law1-58/+52
read. (bfd_error_system_call or bfd_error_file_truncated). * som.c: Do not blindly set bfd_error_system_call after a failing bfd_read, bfd_write, or bfd_seek. In a few places (like som_object_p) override the error status set by bfd_read. * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise. * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise. * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise. * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise. * som.c: Check return values from several bfd_{seek,read,write} calls that we just assumed were not failing.
1994-02-12 * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.David MacKenzie1-3/+21
(bfd_construct_extended_name_table): Check result of normalize.
1994-02-12 Make all callers of malloc or realloc (including via obstacks)David MacKenzie1-0/+10
check the result for NULL. Most set bfd_error to no_memory and return in that case; a few are harder to fix, and are marked with "FIXME <return type>". * elf32-hppa.c (hppa_elf_build_arg_reloc_stub hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return. * linker.c (_bfd_generic_link_output_symbols _bfd_generic_link_write_global_symbol): Ditto * section.c (bfd_make_section_anyway): Ditto. * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc. (first_phase): Ditto. FIXME void (tekhex_make_empty_symbol): Check bfd_zalloc. * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc. (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc. * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate. * srec.c: Indent. (fillup_symbols): Check bfd_alloc. FIXME void (srec_mkobject srec_get_section_contents srec_set_section_contents): Check bfd_alloc. (srec_make_empty_symbol): Check bfd_zalloc. * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t. (make_unique_section): Check bfd_alloc. (som_new_section_hook): Check bfd_zalloc. (bfd_som_attach_aux_hdr): Ditto. FIXME void * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc. * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc. (osf_core_core_file_p): Check bfd_alloc. * oasys.c (oasys_slurp_symbol_table oasys_archive_p oasys_mkobject oasys_object_p oasys_new_section_hook oasys_set_section_contents): Check bfd_alloc. (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc. (oasys_make_empty_symbol): Check bfd_zalloc. * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc. (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc. * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc. * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc. * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc. * linker.c (_bfd_link_hash_newfunc (generic_link_hash_newfunc (archive_hash_newfunc (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate. (_bfd_generic_final_link (_bfd_generic_link_output_symbols (default_indirect_link_order): Check bfd_alloc. (bfd_new_link_order): Check bfd_alloc_by_size_t. * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc. * ieee.c: Indent. (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc. (do_one): Check bfd_alloc. Return a boolean. (ieee_slurp_section_data): Check it. (init_for_output): Check bfd_alloc. Return a boolean. (ieee_set_section_contents): Check it. (do_with_relocs): Check bfd_alloc. Return a boolean. (ieee_bfd_debug_info_accumulate): Ditto. FIXME void. (ieee_mkobject): Check bfd_zalloc. (ieee_make_empty_symbol): Check bfd_zmalloc. * hpux-core.c (hpux_core_make_empty_symbol): Check bfd_zalloc. * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check bfd_zalloc. (hppabsd_core_core_file_p): Check bfd_zalloc. * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc. * elfcode.h (elf_new_section_hook): Check bfd_alloc. (bfd_section_from_phdr): Ditto. (write_relocs): Ditto. FIXME void (elf_map_symbols assign_section_numbers map_program_segments): Ditto. Return a boolean. (swap_out_syms): Ditto. Check elf_map_symbols. (elf_slurp_symbol_table): Check bfd_zalloc. (elf_slurp_reloca_table): Check bfd_alloc. (elf_slurp_reloc_table): Ditto. (elf_compute_section_file_positions): Check assign_section_numbers. (assign_file_positions_except_relocs): Return a boolean. Check map_program_segments. (elf_compute_section_file_positions): Check it. * elf32-mips.c (mips_elf_final_link): Check bfd_alloc. * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and realloc. (hppa_elf_stub_reloc): Ditto. (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc. (hppa_elf_build_long_branch_stub): Ditto. (elf32_hppa_backend_symbol_table_processing): Ditto. * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean. (ecoff_slurp_symbol_table): Check it. (ecoff_slurp_armap): Check bfd_alloc. (ecoff_write_armap): Check bfd_zalloc. (ecoff_link_hash_newfunc): Check bfd_hash_allocate and _bfd_link_hash_newfunc. (ecoff_link_add_externals): Check bfd_alloc. * ctor.c (bfd_constructor_entry): Check bfd_alloc. * coffgen.c (coff_real_object_p): Check bfd_alloc. (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean. (coff_write_symbol): Check bfd_alloc. FIXME int (coff_write_linenumbers): Check bfd_alloc. Return a boolean. (coff_section_symbol): Check bfd_alloc_by_size_t. (coff_get_normalized_symtab): Check bfd_alloc. (coff_bfd_make_debug_symbol): Check bfd_zalloc. * libcoff-in.h: Change decls of coff_renumber_symbols, coff_write_linenumbers. * libcoff.h: Rebuilt. * coffcode.h (coff_write_object_contents): Check coff_renumber_symbols, coff_write_linenumbers. * coffcode.h: Indent. (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a boolean. (coff_write_object_contents): Check it. * coff-alpha.c (alpha_relocate_section): Check bfd_alloc. * coff-mips.c (mips_relocate_section): Ditto. * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value. (do_slurp_bsd_armap): Ditto. (compute_and_write_armap): Check bfd_realloc value. * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc return value. Return boolean value. (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value. (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc return value. (add_to_stringtab): Ditto. FIXME void (aout_link_hash_newfunc): Check bfd_hash_allocate return value. (aout_link_add_symbols): Check bfd_alloc value. (translate_symbol_table): Check translate_from_native_sym_flags. * hp300hpux.c (MY(slurp_symbol_table)): Ditto. * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc. * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc. * opncls.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (_bfd_new_bfd): Check obstack_begin for 0 return. * ieee.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (ieee_archive_p): Check obstack_begin for 0 return and obstack_finish for NULL return. * hash.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (bfd_hash_table_init_n): Check obstack_begin for 0 return and obstack_finish for NULL return. (bfd_hash_lookup): Check obstack_alloc for NULL return. * ecofflink.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. bfd_ecoff_debug_accumulate bfd_ecoff_debug_accumulate_other): Check obstack_alloc. (add_file_shuffle add_memory_shuffle): Check obstack_alloc for NULL return. Return boolean, not void. (bfd_ecoff_debug_init): Check obstack_begin for 0 return. (bfd_ecoff_debug_accumulate): Check add_file_shuffle and add_memory_shuffle return. (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc. (bfd_ecoff_debug_accumulate): Check bfd_alloc. (ecoff_add_string): Check add_memory_shuffle return. * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t): Remove decls. * libbfd.h: Rebuilt.
1994-02-11 * archive.c (compute_and_write_armap): Rewrite somewhat to improveIan Lance Taylor1-16/+63
memory usage.
1994-02-11Fri Feb 11 13:10:42 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-45/+74
* archive.c: Change all references to '\n' in archive magic to '\012', for greater portability. * ecoff.c (ecoff_write_armap): Ditto.
1994-01-25A few more minor formatting cleanups.Ian Lance Taylor1-14/+12
1994-01-25 * archive.c: Reindented to GNU standards.Ian Lance Taylor1-667/+740
1994-01-25 * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): AddDavid MacKenzie1-6/+5
"_bfd_" to function names. * archive.c (_bfd_create_empty_archive_element_shell), libbfd-in.h: Change callers. * libbfd.c (bfd_zmalloc): Renamed from zalloc. * libbfd.c (bfd_add_to_string_table), trad-core.c (trad_unix_core_file_p), targets.c (bfd_target_list), ptrace-core.c (ptrace_unix_core_file_p), opncls.c (new_bfd), libbfd-in.h, ieee.c (ieee_make_empty_symbol), elf32-hppa.c (hppa_elf_stub_branch_reloc), (hppa_elf_stub_reloc): Change callers. * libbfd.h: Regenerated. * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name. (_bfd_get_elt_at_filepos), coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h: Change callers. * format.c (bfd_check_format_matches), libbfd-in.h, targets.c, elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector and default_vector to bfd_default_vector. * libbfd.h: Regenerated.
1994-01-03Renamed get_elt_at_filepos to _bfd_get_elt_at_filepos, and made itIan Lance Taylor1-5/+4
non-static.
1994-01-03 * libbfd-in.h (struct artdata): Added tdata field.Ian Lance Taylor1-90/+116
(_bfd_add_bfd_to_archive_cache): Declare. (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr. * libbfd.h: Rebuilt. * archive.c: Cleaned up some more. (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize pointer elements of artdata. (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache. (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr. (get_extended_arelt_filename, get_elt_at_filepos, bfd_construct_extended_name_table, bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static. * ecoff.c: Some comment changes. (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set ardata->tdata to raw_armap. (ecoff_archive_p): Initialize pointer elements of artdata. * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of add_bfd_to_cache.
1993-12-31 Minor cleanups suggested by CodeCenter.Ian Lance Taylor1-13/+15
* aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c, linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as appropriate. * aoutx.h (struct external_exec): Removed unnecessary declaration. (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL. (adjust_z_magic): Removed useless variable data_vma. (stringtab_init): Initialize hash_zero. (add_to_stringtab): Removed unused fourth argument. (NAME(aout,swap_std_reloc_out)): Removed useless variable r_addend. (aout_link_input_section): Added some casts. * archive.c (get_extended_arelt_filename, do_slurp_coff_armap, bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap): Minor code rewriting to make it more C like. (do_slurp_bsd_armap): Added some casts. * ecoff.c (ecoff_write_object_contents): Removed useless variable scn_base. (ecoff_write_armap): Added some casts. Use "" rather than "\0". * ecofflink.c (bfd_ecoff_write_debug): Added a cast. * libaout.h (struct internal_exec): Removed unnecessary declaration. * linker.c (_bfd_generic_indirect_link_order): Added a cast. * opncls.c (new_bfd): Removed a cast. * reloc.c (bfd_generic_get_relocated_section_contents): Added some casts. * srec.c (internal_srec_write_object_contents): Removed useless variable bytes_written.
1993-11-05doc cleanupDavid MacKenzie1-63/+82
1993-09-14Improve timestamp support in BSD archive files to avoid linkerJohn Gilmore1-50/+279
warnings. * libbfd.h (struct artdata): Add armap_timestamp and armap_datepos. (bfd_flush, bfd_stat): Add prototypes. * libbfd.c (bfd_flush): Add, does fflush on a BFD. (bfd_stat): Add, does fstat on a BFD. * archive.c (_bfd_write_archive_contents): At end of file writing, verify and possibly update the timestamp in the armap, if a BSD archive. FIXME! Kludge recognizes BSD archive, rather than vectoring properly. Should add to xvec. (compute_and_write_armap): Move prototype to top, avoid PROTO. (bsd_write_armap): Save timestamp and file location thereof, when writing the armap in a BSD file. (bsd_update_armap_timestamp): New function to check and rewrite the timestamp.
1992-12-30Wed Dec 30 12:46:30 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-1/+1
* archive.c (do_slurp_coff_armap): set symdef_count correctly (it broke a couple of weeks ago).
1992-12-16Revert change making writing the archive map the standard. Instead, changePer Bothner1-5/+1
the ar program so that *its* default is to always request writing the map.
1992-12-16Various changes to improve archive support. See ChangeLog.Per Bothner1-168/+187
1992-10-15* aout-adobe.c, aoutf1.h, archive.c, bout.c, coff-rs6000.c,John Gilmore1-5/+5
coffcode.h, elf.c, ieee.c, libaout.h, libbfd.c, oasys.c, sco-core.c: Lint: Second argument of bfd_seek is always file_ptr. Third argument is SEEK_SET or SEEK_CUR. Result is always 0 or -1.
1992-10-05Tweak previous change (only assume malformed_archive if errno == 0).Per Bothner1-3/+7
1992-10-05 * archive.c (_bfd_write_archive_contents): If read fails,Per Bothner1-91/+165
set bfd_error to malformed_archive (since this probably indicates a truncated archive), rather than system_call_error. (Handles PRMS 1624.)
1991-12-17Archive doc.David Henkel-Wallace1-112/+181
1991-12-01 * aout-encap.c, aoutf1.h, aoutx.h, archive.c, bout.c, coff-a29k.c,Steve Chamberlain1-2/+2
coff-h8300.c, coff-i386.c, coff-i960.c, coff-m68k.c, coff-m88k.c, coff-mips.c, coff-rs6000.c, cpu-h300.c, elf.c, i386aout.c, newos3.c, stab-syms.c, syms.c: All these files have had their #includes altered to point to the new places.
1991-12-01New documentation styleSteve Chamberlain1-27/+51
1991-11-29Two small bug-fixes (affecting ar and nm).Per Bothner1-69/+78
1991-10-21 * targets.c (proto write_armap). Changed orl_count to unsigned.Steve Chamberlain1-35/+52
* opncls.c (bfd_close_all_done). Added so that generative programs like gas can close a bfd without causing bfd confusion. * libbfd.h (changed becuase of protos) * amdcoff.c: messed with the way that jmp displacements are calcualated. This may not yet be totally correct. * archive.c (coff_write_armap): rewrote the way that ranlibs are written out. * coffcode.h (fixup_symbol_value): now doesn't core dump if a non abs symbol has no section (like a register symbol). (coff_write_symbol) now zeros auxent before filling it up to help with sensitive applications. * libbfd.c (bfd_write_bigendian_4byte_int): added.
1991-08-19Mon Aug 19 13:48:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)Roland Pesch1-22/+26
* aoutx.h, archive.c, archures.c, bfd.c, bfd.texinfo, cache.c, coffcode.h, core.c, format.c, libbfd.c, libbfd.h, libcoff.h, opncls.c, reloc.c, section.c, syms.c, targets.c (documentation segments): used BFD (caps) more consistently as a name in discourse, fixed a few other minor typos and uses of fonts
1991-07-06Add comment about commented-out bfd_release calls.John Gilmore1-2/+5
1991-07-04Now full of documentation. Yum Yum.Steve Chamberlain1-62/+109
1991-05-27I think this gets symdefs right for at least sunos. Also now swapsK. Richard Pixley1-22/+22
symdefs.
1991-05-21*** empty log message ***Steve Chamberlain1-3/+9
1991-05-10Lint.John Gilmore1-6/+6
1991-05-08Various portability lints.Steve Chamberlain1-5/+5
Fixed reloc bug in ieee and oasys.
1991-05-04Saber C cleanup. Fix horrid bug in opncls.c in which an obstack isJohn Gilmore1-4/+8
initialized on the stack and then copied into its own allocated space. (Wow, Steve, you're twisted...)
1991-05-02Merge devo/bfd with GDB's bfd.John Gilmore1-39/+43
Remove obstack.h to ../include and obstack.c to ../libiberty. Move COFF symbol swapping code to coffswap.c where GDB can call it but it won't be duplicated if we have N different COFF targets. Add support for traditional Unix core files (with a upage). This support is from an Ultrix port, but is probably slightly broken now. Improve bfd_release's of obstack'd items on error returns. gcc -Wall fixes. Handle section alignment slightly better in coff, and comment where it needs more work (on page-aligning virtual vs file addresses for DPAGED). Use set_tdata everywhere that tdata is set, to avoid "cast to the left of assignment" problems with some compilers. Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h (from bfd.h) since they are internal routines. Remove the redundant suffix "_struct" from struct tags. Set symbol count early in file reading, before slurping in the syms, for GDB's use.
1991-04-25Minor changes to accomodate merging of three include file directories.John Gilmore1-1/+3
1991-04-23*** empty log message ***Steve Chamberlain1-0/+1
1991-04-23*** empty log message ***Steve Chamberlain1-40/+33
1991-04-17Changed bad call of fstat to statSteve Chamberlain1-1/+1