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/xcofflink.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/xcofflink.c')
-rw-r--r-- | bfd/xcofflink.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index 9841de6..f6c7fe6 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -571,7 +571,19 @@ xcoff_link_hash_newfunc (struct bfd_hash_entry *entry, return (struct bfd_hash_entry *) ret; } -/* Create a XCOFF link hash table. */ +/* Destroy an XCOFF link hash table. */ + +void +_bfd_xcoff_bfd_link_hash_table_free (struct bfd_link_hash_table *hash) +{ + struct xcoff_link_hash_table *ret = (struct xcoff_link_hash_table *) hash; + + _bfd_stringtab_free (ret->debug_strtab); + bfd_hash_table_free (&ret->root.table); + free (ret); +} + +/* Create an XCOFF link hash table. */ struct bfd_link_hash_table * _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) @@ -600,18 +612,6 @@ _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) return &ret->root; } - -/* Free a XCOFF link hash table. */ - -void -_bfd_xcoff_bfd_link_hash_table_free (struct bfd_link_hash_table *hash) -{ - struct xcoff_link_hash_table *ret = (struct xcoff_link_hash_table *) hash; - - _bfd_stringtab_free (ret->debug_strtab); - bfd_hash_table_free (&ret->root.table); - free (ret); -} /* Read internal relocs for an XCOFF csect. This is a wrapper around _bfd_coff_read_internal_relocs which tries to take advantage of any |