areltdata.
* opncls.c (_bfd_delete_bfd): Free arelt_data.
* mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
areltdata.
* ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
* coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
areltdata.
(xcoff_write_archive_contents_old): Likewise.
(xcoff_write_archive_contents_big): Likewise.
* archive64.c (bfd_elf64_archive_slurp_armap): Use free for
areltdata.
* archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
free for areltdata.
(_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
failure.
(do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
(do_slurp_coff_armap): Likewise.
(_bfd_slurp_extended_name_table): Likewise.
(bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
* vms-lib.c (credat_lo, credat_hi): New fields.
(vms_read_block): Adjust comments.
(vms_write_block): New function.
(_bfd_vms_lib_archive_p): Decode majorid once. Replace some
hard-coded values with constants. Set credat_lo and credat_hi.
(_bfd_vms_lib_mkarchive): Add argument kind.
Set ver, mhd_size and type according to kind.
(_bfd_vms_lib_alpha_mkarchive): New function.
(struct lib_index): Renamed from struct vms_index
(lib_index_cmp): Renamed from vms_index_cmp. Adjusted.
(get_idxlen): Type of idx argument adjusted. Add is_elfidx
argument and handle it.
(vms_write_index): Adjust argument idx. Handle elf indexes.
(_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
(_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
use it. Handle elf indexes. Set credat.
* libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
(_bfd_vms_lib_alpha_mkarchive): ... this.
* libbfd.h: Regenerated.
* vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
* vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
* libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
* libbfd.h: Regenerate.
* configure.in (havevecs): Define HAVE_all_vecs when
--enable-targets=all is set. Use AC_SUBST on it.
(tdefaults): Do not add havevecs.
(bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
* configure: Regenerate.
* Makefile.am (HAVEVECS): New variable.
(INCLUDES): Add HAVEVECS.
* Makefile.in: Regenerate.
* elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
target is selected. Add #ifdef/#endif around vms specific code.
(bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
bfd_elfNN_archive_slurp_extended_name_table,
bfd_elfNN_archive_construct_extended_name_table,
bfd_elfNN_archive_truncate_arname,
bfd_elfNN_archive_write_armap,
bfd_elfNN_archive_read_ar_hdr,
bfd_elfNN_archive_write_ar_hdr,
bfd_elfNN_archive_openr_next_archived_file,
bfd_elfNN_archive_get_elt_at_index,
bfd_elfNN_archive_generic_stat_arch_elt,
bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
2010-05-03 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
next array.
(vms_lib_dcx): Adjust for the above change.
* vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
(_bfd_vms_get_object_record): Always assume there is a pad byte
for alignment.
* vms-lib.c: Add a few comments.