From 68faa6378d757de1fdf29f7d27025c5eadd897ec Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 13 Jun 2014 19:11:19 +0930 Subject: Move link_hash_table_free functions earlier Move some code around, in preparation for a followup patch. * elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c: Move link_hash_table_free functions before their corresponding link_hash_table_create functions. --- bfd/elfxx-sparc.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'bfd/elfxx-sparc.c') diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 3470f24..48ca02a 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -1102,6 +1102,21 @@ elf_sparc_get_local_sym_hash (struct _bfd_sparc_elf_link_hash_table *htab, return &ret->elf; } +/* Destroy a SPARC ELF linker hash table. */ + +void +_bfd_sparc_elf_link_hash_table_free (struct bfd_link_hash_table *hash) +{ + struct _bfd_sparc_elf_link_hash_table *htab + = (struct _bfd_sparc_elf_link_hash_table *) 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_generic_link_hash_table_free (hash); +} + /* Create a SPARC ELF linker hash table. */ struct bfd_link_hash_table * @@ -1175,21 +1190,6 @@ _bfd_sparc_elf_link_hash_table_create (bfd *abfd) return &ret->elf.root; } -/* Destroy a SPARC ELF linker hash table. */ - -void -_bfd_sparc_elf_link_hash_table_free (struct bfd_link_hash_table *hash) -{ - struct _bfd_sparc_elf_link_hash_table *htab - = (struct _bfd_sparc_elf_link_hash_table *) 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_generic_link_hash_table_free (hash); -} - /* Create .plt, .rela.plt, .got, .rela.got, .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -- cgit v1.1