summaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2012-08-07 13:47:13 +0000
committerNick Clifton <nickc@redhat.com>2012-08-07 13:47:13 +0000
commit9eae5acd8cbf611e3f2fe496d241d224fd462ecd (patch)
treeda00dd76c29eda814ba4a4dd9c27cb7f2a3d568d /bfd/archive.c
parentb6207acb286413d8b1c54d4c6ab6912fe4ac6ac9 (diff)
downloadbinutils-redhat-9eae5acd8cbf611e3f2fe496d241d224fd462ecd.tar.gz
* config/tc-i386.c (lex_got): Provide implementation for PE
format. * gas/i386/secrel.s: Add test of <symbol>@SECREL32. * gas/i386/secrel.d: Add expected disassembly. * scripttempl/pe.sc (R_TLS): Add .tls$AAA and .tls$ZZZ. * scripttempl/pep.sc (R_TLS): Add .tls$AAA and .tls$ZZZ. * archive.c (_bfd_delete_archive_data): New function. * libbfd-in.h (_bfd_delete_archive_data): Declare. * libbfd.h: Rebuild. * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index fe57755770..1148c115fd 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -293,6 +293,19 @@ bfd_set_archive_head (bfd *output_archive, bfd *new_head)
return TRUE;
}
+/* Free the archive hash table, if it exists. */
+
+void
+_bfd_delete_archive_data (bfd *abfd)
+{
+ struct artdata *ardata = bfd_ardata (abfd);
+
+ BFD_ASSERT (abfd->format == bfd_archive);
+
+ if (ardata && ardata->cache)
+ htab_delete (ardata->cache);
+}
+
bfd *
_bfd_look_for_bfd_in_cache (bfd *arch_bfd, file_ptr filepos)
{