Lines Matching refs:tab

128 _bfd_elf_strtab_free (struct elf_strtab_hash *tab)  in _bfd_elf_strtab_free()  argument
130 bfd_hash_table_free (&tab->table); in _bfd_elf_strtab_free()
131 free (tab->array); in _bfd_elf_strtab_free()
132 free (tab); in _bfd_elf_strtab_free()
139 _bfd_elf_strtab_add (struct elf_strtab_hash *tab, in _bfd_elf_strtab_add() argument
150 BFD_ASSERT (tab->sec_size == 0); in _bfd_elf_strtab_add()
152 bfd_hash_lookup (&tab->table, str, TRUE, copy); in _bfd_elf_strtab_add()
163 if (tab->size == tab->alloced) in _bfd_elf_strtab_add()
166 tab->alloced *= 2; in _bfd_elf_strtab_add()
167 tab->array = bfd_realloc (tab->array, tab->alloced * amt); in _bfd_elf_strtab_add()
168 if (tab->array == NULL) in _bfd_elf_strtab_add()
172 entry->u.index = tab->size++; in _bfd_elf_strtab_add()
173 tab->array[entry->u.index] = entry; in _bfd_elf_strtab_add()
179 _bfd_elf_strtab_addref (struct elf_strtab_hash *tab, bfd_size_type idx) in _bfd_elf_strtab_addref() argument
183 BFD_ASSERT (tab->sec_size == 0); in _bfd_elf_strtab_addref()
184 BFD_ASSERT (idx < tab->size); in _bfd_elf_strtab_addref()
185 ++tab->array[idx]->refcount; in _bfd_elf_strtab_addref()
189 _bfd_elf_strtab_delref (struct elf_strtab_hash *tab, bfd_size_type idx) in _bfd_elf_strtab_delref() argument
193 BFD_ASSERT (tab->sec_size == 0); in _bfd_elf_strtab_delref()
194 BFD_ASSERT (idx < tab->size); in _bfd_elf_strtab_delref()
195 BFD_ASSERT (tab->array[idx]->refcount > 0); in _bfd_elf_strtab_delref()
196 --tab->array[idx]->refcount; in _bfd_elf_strtab_delref()
200 _bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab) in _bfd_elf_strtab_clear_all_refs() argument
204 for (idx = 1; idx < tab->size; ++idx) in _bfd_elf_strtab_clear_all_refs()
205 tab->array[idx]->refcount = 0; in _bfd_elf_strtab_clear_all_refs()
209 _bfd_elf_strtab_size (struct elf_strtab_hash *tab) in _bfd_elf_strtab_size() argument
211 return tab->sec_size ? tab->sec_size : tab->size; in _bfd_elf_strtab_size()
215 _bfd_elf_strtab_offset (struct elf_strtab_hash *tab, bfd_size_type idx) in _bfd_elf_strtab_offset() argument
221 BFD_ASSERT (idx < tab->size); in _bfd_elf_strtab_offset()
222 BFD_ASSERT (tab->sec_size); in _bfd_elf_strtab_offset()
223 entry = tab->array[idx]; in _bfd_elf_strtab_offset()
226 return tab->array[idx]->u.index; in _bfd_elf_strtab_offset()
230 _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab) in _bfd_elf_strtab_emit() argument
237 for (i = 1; i < tab->size; ++i) in _bfd_elf_strtab_emit()
242 BFD_ASSERT (tab->array[i]->refcount == 0); in _bfd_elf_strtab_emit()
243 len = tab->array[i]->len; in _bfd_elf_strtab_emit()
247 str = tab->array[i]->root.string; in _bfd_elf_strtab_emit()
254 BFD_ASSERT (off == tab->sec_size); in _bfd_elf_strtab_emit()
299 _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab) in _bfd_elf_strtab_finalize() argument
311 amt = tab->size * sizeof (struct elf_strtab_hash_entry *); in _bfd_elf_strtab_finalize()
316 for (i = 1, a = array; i < tab->size; ++i) in _bfd_elf_strtab_finalize()
318 e = tab->array[i]; in _bfd_elf_strtab_finalize()
371 for (i = 1; i < tab->size; ++i) in _bfd_elf_strtab_finalize()
373 e = tab->array[i]; in _bfd_elf_strtab_finalize()
381 tab->sec_size = size; in _bfd_elf_strtab_finalize()
384 for (i = 1; i < tab->size; ++i) in _bfd_elf_strtab_finalize()
386 e = tab->array[i]; in _bfd_elf_strtab_finalize()