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/elfnn-aarch64.c | |
parent | c72f2fb2bb6a3e1850b081dbfce4040970fae8e6 (diff) | |
download | gdb-68faa6378d757de1fdf29f7d27025c5eadd897ec.zip gdb-68faa6378d757de1fdf29f7d27025c5eadd897ec.tar.gz gdb-68faa6378d757de1fdf29f7d27025c5eadd897ec.tar.bz2 |
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/elfnn-aarch64.c')
-rw-r--r-- | bfd/elfnn-aarch64.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 65ca2a4..c1ca594 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -2055,6 +2055,23 @@ elfNN_aarch64_copy_indirect_symbol (struct bfd_link_info *info, _bfd_elf_link_hash_copy_indirect (info, dir, ind); } +/* Destroy an AArch64 elf linker hash table. */ + +static void +elfNN_aarch64_link_hash_table_free (struct bfd_link_hash_table *hash) +{ + struct elf_aarch64_link_hash_table *ret + = (struct elf_aarch64_link_hash_table *) hash; + + if (ret->loc_hash_table) + htab_delete (ret->loc_hash_table); + if (ret->loc_hash_memory) + objalloc_free ((struct objalloc *) ret->loc_hash_memory); + + bfd_hash_table_free (&ret->stub_hash_table); + _bfd_elf_link_hash_table_free (hash); +} + /* Create an AArch64 elf linker hash table. */ static struct bfd_link_hash_table * @@ -2101,23 +2118,6 @@ elfNN_aarch64_link_hash_table_create (bfd *abfd) return &ret->root.root; } -/* Free the derived linker hash table. */ - -static void -elfNN_aarch64_hash_table_free (struct bfd_link_hash_table *hash) -{ - struct elf_aarch64_link_hash_table *ret - = (struct elf_aarch64_link_hash_table *) hash; - - if (ret->loc_hash_table) - htab_delete (ret->loc_hash_table); - if (ret->loc_hash_memory) - objalloc_free ((struct objalloc *) ret->loc_hash_memory); - - bfd_hash_table_free (&ret->stub_hash_table); - _bfd_elf_link_hash_table_free (hash); -} - static bfd_boolean aarch64_relocate (unsigned int r_type, bfd *input_bfd, asection *input_section, bfd_vma offset, bfd_vma value) @@ -7197,7 +7197,7 @@ const struct elf_size_info elfNN_aarch64_size_info = elfNN_aarch64_link_hash_table_create #define bfd_elfNN_bfd_link_hash_table_free \ - elfNN_aarch64_hash_table_free + elfNN_aarch64_link_hash_table_free #define bfd_elfNN_bfd_merge_private_bfd_data \ elfNN_aarch64_merge_private_bfd_data |