X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-avr.c;h=02cb449e09f26b77d16769cc0122b5baa1d4841a;hb=68faa6378d757de1fdf29f7d27025c5eadd897ec;hp=60a2c7f513b536d1b32769428655e93a31e79ad9;hpb=c72f2fb2bb6a3e1850b081dbfce4040970fae8e6;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 60a2c7f513..02cb449e09 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -711,6 +711,24 @@ elf32_avr_link_hash_newfunc (struct bfd_hash_entry * entry, return _bfd_elf_link_hash_newfunc (entry, table, string); } +/* Free the derived linker hash table. */ + +static void +elf32_avr_link_hash_table_free (struct bfd_link_hash_table *btab) +{ + struct elf32_avr_link_hash_table *htab + = (struct elf32_avr_link_hash_table *) btab; + + /* Free the address mapping table. */ + if (htab->amt_stub_offsets != NULL) + free (htab->amt_stub_offsets); + if (htab->amt_destination_addr != NULL) + free (htab->amt_destination_addr); + + bfd_hash_table_free (&htab->bstab); + _bfd_elf_link_hash_table_free (btab); +} + /* Create the derived linker hash table. The AVR ELF port uses the derived hash table to keep information specific to the AVR ELF linker (without using static variables). */ @@ -742,24 +760,6 @@ elf32_avr_link_hash_table_create (bfd *abfd) return &htab->etab.root; } -/* Free the derived linker hash table. */ - -static void -elf32_avr_link_hash_table_free (struct bfd_link_hash_table *btab) -{ - struct elf32_avr_link_hash_table *htab - = (struct elf32_avr_link_hash_table *) btab; - - /* Free the address mapping table. */ - if (htab->amt_stub_offsets != NULL) - free (htab->amt_stub_offsets); - if (htab->amt_destination_addr != NULL) - free (htab->amt_destination_addr); - - bfd_hash_table_free (&htab->bstab); - _bfd_elf_link_hash_table_free (btab); -} - /* Calculates the effective distance of a pc relative jump/call. */ static int