aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-avr.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-avr.c')
-rw-r--r--bfd/elf32-avr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index 5595384..b46a44c 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -714,10 +714,10 @@ elf32_avr_link_hash_newfunc (struct bfd_hash_entry * entry,
/* Free the derived linker hash table. */
static void
-elf32_avr_link_hash_table_free (struct bfd_link_hash_table *btab)
+elf32_avr_link_hash_table_free (bfd *obfd)
{
struct elf32_avr_link_hash_table *htab
- = (struct elf32_avr_link_hash_table *) btab;
+ = (struct elf32_avr_link_hash_table *) obfd->link.hash;
/* Free the address mapping table. */
if (htab->amt_stub_offsets != NULL)
@@ -726,7 +726,7 @@ elf32_avr_link_hash_table_free (struct bfd_link_hash_table *btab)
free (htab->amt_destination_addr);
bfd_hash_table_free (&htab->bstab);
- _bfd_elf_link_hash_table_free (btab);
+ _bfd_elf_link_hash_table_free (obfd);
}
/* Create the derived linker hash table. The AVR ELF port uses the derived
@@ -755,8 +755,11 @@ elf32_avr_link_hash_table_create (bfd *abfd)
/* Init the stub hash table too. */
if (!bfd_hash_table_init (&htab->bstab, stub_hash_newfunc,
sizeof (struct elf32_avr_stub_hash_entry)))
- return NULL;
- (void) elf32_avr_link_hash_table_free;
+ {
+ _bfd_elf_link_hash_table_free (abfd);
+ return NULL;
+ }
+ htab->etab.root.hash_table_free = elf32_avr_link_hash_table_free;
return &htab->etab.root;
}