aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.h
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1993-09-14 04:13:43 +0000
committerJohn Gilmore <gnu@cygnus>1993-09-14 04:13:43 +0000
commitb5b4294e653c033981eb8eee4f0473e520e0b5d5 (patch)
tree9833aac04f6a1254a24974efc45f2622bfd4cb74 /bfd/libbfd.h
parent55fea07b5521471b905a0695f0541cf4ddc130e7 (diff)
downloadgdb-b5b4294e653c033981eb8eee4f0473e520e0b5d5.zip
gdb-b5b4294e653c033981eb8eee4f0473e520e0b5d5.tar.gz
gdb-b5b4294e653c033981eb8eee4f0473e520e0b5d5.tar.bz2
Improve timestamp support in BSD archive files to avoid linker
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.
Diffstat (limited to 'bfd/libbfd.h')
-rw-r--r--bfd/libbfd.h53
1 files changed, 12 insertions, 41 deletions
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 0335cab..8712e79 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -44,6 +44,15 @@ struct artdata {
carsym *symdefs; /* the symdef entries */
symindex symdef_count; /* how many there are */
char *extended_names; /* clever intel extension */
+
+ time_t armap_timestamp; /* Timestamp value written into armap.
+ This is used for BSD archives to check
+ that the timestamp is recent enough
+ for the BSD linker to not complain,
+ just before we finish writing an
+ archive. */
+ file_ptr armap_datepos; /* Position within archive to seek to
+ rewrite the date field. */
};
#define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data)
@@ -80,6 +89,9 @@ int bfd_seek PARAMS ((bfd* CONST abfd, CONST file_ptr fp,
CONST int direction));
long bfd_tell PARAMS ((bfd *abfd));
+int bfd_flush PARAMS ((bfd *abfd));
+int bfd_stat PARAMS ((bfd *abfd, struct stat *));
+
bfd * _bfd_create_empty_archive_element_shell PARAMS ((bfd *obfd));
bfd * look_for_bfd_in_cache PARAMS ((bfd *arch_bfd, file_ptr index));
boolean _bfd_generic_mkarchive PARAMS ((bfd *abfd));
@@ -98,47 +110,6 @@ boolean bfd_add_to_string_table PARAMS ((char **table, char *new_string,
unsigned int *table_length,
char **free_ptr));
-/* Byte swapping routines from libbfd.c */
-
-/* namespace protection */
-#define _do_getb64 _bfd__do_getb64
-#define _do_getl64 _bfd__do_getl64
-#define _do_getb_signed_64 _bfd__do_getb_signed_64
-#define _do_getl_signed_64 _bfd__do_getl_signed_64
-#define _do_getb32 _bfd__do_getb32
-#define _do_getl32 _bfd__do_getl32
-#define _do_getb_signed_32 _bfd__do_getb_signed_32
-#define _do_getl_signed_32 _bfd__do_getl_signed_32
-#define _do_getb16 _bfd__do_getb16
-#define _do_getl16 _bfd__do_getl16
-#define _do_getb_signed_16 _bfd__do_getb_signed_16
-#define _do_getl_signed_16 _bfd__do_getl_signed_16
-#define _do_putb64 _bfd__do_putb64
-#define _do_putl64 _bfd__do_putl64
-#define _do_putb32 _bfd__do_putb32
-#define _do_putl32 _bfd__do_putl32
-#define _do_putb16 _bfd__do_putb16
-#define _do_putl16 _bfd__do_putl16
-
-bfd_vma _do_getb64 PARAMS ((unsigned char *addr));
-bfd_vma _do_getl64 PARAMS ((unsigned char *addr));
-bfd_signed_vma _do_getb_signed_64 PARAMS ((unsigned char *addr));
-bfd_signed_vma _do_getl_signed_64 PARAMS ((unsigned char *addr));
-bfd_vma _do_getb32 PARAMS ((unsigned char *addr));
-bfd_vma _do_getl32 PARAMS ((unsigned char *addr));
-bfd_signed_vma _do_getb_signed_32 PARAMS ((unsigned char *addr));
-bfd_signed_vma _do_getl_signed_32 PARAMS ((unsigned char *addr));
-bfd_vma _do_getb16 PARAMS ((unsigned char *addr));
-bfd_vma _do_getl16 PARAMS ((unsigned char *addr));
-bfd_signed_vma _do_getb_signed_16 PARAMS ((unsigned char *addr));
-bfd_signed_vma _do_getl_signed_16 PARAMS ((unsigned char *addr));
-void _do_putb64 PARAMS ((bfd_vma data, unsigned char *addr));
-void _do_putl64 PARAMS ((bfd_vma data, unsigned char *addr));
-void _do_putb32 PARAMS ((bfd_vma data, unsigned char *addr));
-void _do_putl32 PARAMS ((bfd_vma data, unsigned char *addr));
-void _do_putb16 PARAMS ((bfd_vma data, unsigned char *addr));
-void _do_putl16 PARAMS ((bfd_vma data, unsigned char *addr));
-
boolean bfd_false PARAMS ((bfd *ignore));
boolean bfd_true PARAMS ((bfd *ignore));
PTR bfd_nullvoidptr PARAMS ((bfd *ignore));