aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-aarch64.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r--bfd/elfnn-aarch64.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 4baa41b..a8578da 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -2058,10 +2058,10 @@ elfNN_aarch64_copy_indirect_symbol (struct bfd_link_info *info,
/* Destroy an AArch64 elf linker hash table. */
static void
-elfNN_aarch64_link_hash_table_free (struct bfd_link_hash_table *hash)
+elfNN_aarch64_link_hash_table_free (bfd *obfd)
{
struct elf_aarch64_link_hash_table *ret
- = (struct elf_aarch64_link_hash_table *) hash;
+ = (struct elf_aarch64_link_hash_table *) obfd->link.hash;
if (ret->loc_hash_table)
htab_delete (ret->loc_hash_table);
@@ -2069,7 +2069,7 @@ elfNN_aarch64_link_hash_table_free (struct bfd_link_hash_table *hash)
objalloc_free ((struct objalloc *) ret->loc_hash_memory);
bfd_hash_table_free (&ret->stub_hash_table);
- _bfd_elf_link_hash_table_free (hash);
+ _bfd_elf_link_hash_table_free (obfd);
}
/* Create an AArch64 elf linker hash table. */
@@ -2100,7 +2100,7 @@ elfNN_aarch64_link_hash_table_create (bfd *abfd)
if (!bfd_hash_table_init (&ret->stub_hash_table, stub_hash_newfunc,
sizeof (struct elf_aarch64_stub_hash_entry)))
{
- free (ret);
+ _bfd_elf_link_hash_table_free (abfd);
return NULL;
}
@@ -2111,10 +2111,10 @@ elfNN_aarch64_link_hash_table_create (bfd *abfd)
ret->loc_hash_memory = objalloc_create ();
if (!ret->loc_hash_table || !ret->loc_hash_memory)
{
- free (ret);
+ elfNN_aarch64_link_hash_table_free (abfd);
return NULL;
}
- (void) elfNN_aarch64_link_hash_table_free;
+ ret->root.root.hash_table_free = elfNN_aarch64_link_hash_table_free;
return &ret->root.root;
}