diff options
author | Alan Modra <amodra@gmail.com> | 2014-06-13 19:11:19 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2014-06-13 19:11:19 +0930 |
commit | 68faa6378d757de1fdf29f7d27025c5eadd897ec (patch) | |
tree | d8328db037f37874cf6bbcbc9d099851c40b8668 /bfd/elf64-ppc.c | |
parent | c72f2fb2bb6a3e1850b081dbfce4040970fae8e6 (diff) | |
download | binutils-68faa6378d757de1fdf29f7d27025c5eadd897ec.tar.gz binutils-68faa6378d757de1fdf29f7d27025c5eadd897ec.tar.bz2 binutils-68faa6378d757de1fdf29f7d27025c5eadd897ec.zip |
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.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 1d5d4ab2b74..29d2b773407 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -4142,6 +4142,20 @@ tocsave_htab_eq (const void *p1, const void *p2) return e1->sec == e2->sec && e1->offset == e2->offset; } +/* Destroy a ppc64 ELF linker hash table. */ + +static void +ppc64_elf_link_hash_table_free (struct bfd_link_hash_table *hash) +{ + struct ppc_link_hash_table *htab = (struct ppc_link_hash_table *) hash; + + bfd_hash_table_free (&htab->stub_hash_table); + bfd_hash_table_free (&htab->branch_hash_table); + if (htab->tocsave_htab) + htab_delete (htab->tocsave_htab); + _bfd_elf_link_hash_table_free (hash); +} + /* Create a ppc64 ELF linker hash table. */ static struct bfd_link_hash_table * @@ -4207,20 +4221,6 @@ ppc64_elf_link_hash_table_create (bfd *abfd) return &htab->elf.root; } -/* Free the derived linker hash table. */ - -static void -ppc64_elf_link_hash_table_free (struct bfd_link_hash_table *hash) -{ - struct ppc_link_hash_table *htab = (struct ppc_link_hash_table *) hash; - - bfd_hash_table_free (&htab->stub_hash_table); - bfd_hash_table_free (&htab->branch_hash_table); - if (htab->tocsave_htab) - htab_delete (htab->tocsave_htab); - _bfd_elf_link_hash_table_free (hash); -} - /* Create sections for linker generated code. */ static bfd_boolean |