aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index aa61f76..b4b9f29 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -675,7 +675,7 @@ _bfd_generic_link_hash_table_create (abfd)
struct generic_link_hash_table *ret;
bfd_size_type amt = sizeof (struct generic_link_hash_table);
- ret = (struct generic_link_hash_table *) bfd_alloc (abfd, amt);
+ ret = (struct generic_link_hash_table *) bfd_malloc (amt);
if (ret == NULL)
return (struct bfd_link_hash_table *) NULL;
if (! _bfd_link_hash_table_init (&ret->root, abfd,
@@ -687,6 +687,17 @@ _bfd_generic_link_hash_table_create (abfd)
return &ret->root;
}
+void
+_bfd_generic_link_hash_table_free (hash)
+ struct bfd_link_hash_table *hash;
+{
+ struct generic_link_hash_table *ret
+ = (struct generic_link_hash_table *) hash;
+
+ bfd_hash_table_free (&ret->root.table);
+ free (ret);
+}
+
/* Grab the symbols for an object file when doing a generic link. We
store the symbols in the outsymbols field. We need to keep them
around for the entire link to ensure that we only read them once.