aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
AgeCommit message (Collapse)AuthorFilesLines
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
1991-04-15Merged in some changes from Intel,Steve Chamberlain1-92/+100
Added some more prototypes.
1991-04-04*** empty log message ***Steve Chamberlain1-4/+11
1991-04-04Minor format fixes.David Henkel-Wallace1-4/+9
1991-04-03Various noiseSteve Chamberlain1-54/+59
1991-03-21Initial revisionDavid Henkel-Wallace1-0/+1223