diff options
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 27f0a54..894ab98 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -970,16 +970,16 @@ elf_x86_64_get_local_sym_hash (struct elf_x86_64_link_hash_table *htab, /* Destroy an X86-64 ELF linker hash table. */ static void -elf_x86_64_link_hash_table_free (struct bfd_link_hash_table *hash) +elf_x86_64_link_hash_table_free (bfd *obfd) { struct elf_x86_64_link_hash_table *htab - = (struct elf_x86_64_link_hash_table *) hash; + = (struct elf_x86_64_link_hash_table *) obfd->link.hash; if (htab->loc_hash_table) htab_delete (htab->loc_hash_table); if (htab->loc_hash_memory) objalloc_free ((struct objalloc *) htab->loc_hash_memory); - _bfd_elf_link_hash_table_free (hash); + _bfd_elf_link_hash_table_free (obfd); } /* Create an X86-64 ELF linker hash table. */ @@ -1027,10 +1027,10 @@ elf_x86_64_link_hash_table_create (bfd *abfd) ret->loc_hash_memory = objalloc_create (); if (!ret->loc_hash_table || !ret->loc_hash_memory) { - free (ret); + elf_x86_64_link_hash_table_free (abfd); return NULL; } - (void) elf_x86_64_link_hash_table_free; + ret->elf.root.hash_table_free = elf_x86_64_link_hash_table_free; return &ret->elf.root; } |