[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.8 Archive functions

The `BFD_JUMP_TABLE_ARCHIVE' macro is used for functions which deal with archive files. Most targets use COFF style archive files (including ELF targets), and these use `_bfd_archive_coff' as the argument to `BFD_JUMP_TABLE_ARCHIVE'. Some targets use BSD/a.out style archives, and these use `_bfd_archive_bsd'. (The main difference between BSD and COFF archives is the format of the archive symbol table). Targets with no archive support use `_bfd_noarchive'. Finally, a few targets have unusual archive handling.

`_slurp_armap'
Read in the archive symbol table, storing it in private BFD data. This is normally called from the archive `check_format' routine. The corresponding field in the target vector is named `_bfd_slurp_armap'.

`_slurp_extended_name_table'
Read in the extended name table from the archive, if there is one, storing it in private BFD data. This is normally called from the archive `check_format' routine. The corresponding field in the target vector is named `_bfd_slurp_extended_name_table'.

`construct_extended_name_table'
Build and return an extended name table if one is needed to write out the archive. This also adjusts the archive headers to refer to the extended name table appropriately. This is normally called from the archive `write_contents' routine. The corresponding field in the target vector is named `_bfd_construct_extended_name_table'.

`_truncate_arname'
This copies a file name into an archive header, truncating it as required. It is normally called from the archive `write_contents' routine. This function is more interesting in targets which do not support extended name tables, but I think the GNU `ar' program always uses extended name tables anyhow. The corresponding field in the target vector is named `_bfd_truncate_arname'.

`_write_armap'
Write out the archive symbol table using calls to `bfd_bwrite'. This is normally called from the archive `write_contents' routine. The corresponding field in the target vector is named `write_armap' (no leading underscore).

`_read_ar_hdr'
Read and parse an archive header. This handles expanding the archive header name into the real file name using the extended name table. This is called by routines which read the archive symbol table or the archive itself. The corresponding field in the target vector is named `_bfd_read_ar_hdr_fn'.

`_openr_next_archived_file'
Given an archive and a BFD representing a file stored within the archive, return a BFD for the next file in the archive. This is called via `bfd_openr_next_archived_file'. The corresponding field in the target vector is named `openr_next_archived_file' (no leading underscore).

`_get_elt_at_index'
Given an archive and an index, return a BFD for the file in the archive corresponding to that entry in the archive symbol table. This is called via `bfd_get_elt_at_index'. The corresponding field in the target vector is named `_bfd_get_elt_at_index'.

`_generic_stat_arch_elt'
Do a stat on an element of an archive, returning information read from the archive header (modification time, uid, gid, file mode, size). This is called via `bfd_stat_arch_elt'. The corresponding field in the target vector is named `_bfd_stat_arch_elt'.

`_update_armap_timestamp'
After the entire contents of an archive have been written out, update the timestamp of the archive symbol table to be newer than that of the file. This is required for a.out style archives. This is normally called by the archive `write_contents' routine. The corresponding field in the target vector is named `_bfd_update_armap_timestamp'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by system on December, 2 2004 using texi2html