Lines Matching defs:tab

127 _bfd_elf_strtab_free (struct elf_strtab_hash *tab)
129 bfd_hash_table_free (&tab->table);
130 free (tab->array);
131 free (tab);
138 _bfd_elf_strtab_add (struct elf_strtab_hash *tab,
149 BFD_ASSERT (tab->sec_size == 0);
151 bfd_hash_lookup (&tab->table, str, TRUE, copy);
162 if (tab->size == tab->alloced)
165 tab->alloced *= 2;
166 tab->array = bfd_realloc (tab->array, tab->alloced * amt);
167 if (tab->array == NULL)
171 entry->u.index = tab->size++;
172 tab->array[entry->u.index] = entry;
178 _bfd_elf_strtab_addref (struct elf_strtab_hash *tab, bfd_size_type idx)
182 BFD_ASSERT (tab->sec_size == 0);
183 BFD_ASSERT (idx < tab->size);
184 ++tab->array[idx]->refcount;
188 _bfd_elf_strtab_delref (struct elf_strtab_hash *tab, bfd_size_type idx)
192 BFD_ASSERT (tab->sec_size == 0);
193 BFD_ASSERT (idx < tab->size);
194 BFD_ASSERT (tab->array[idx]->refcount > 0);
195 --tab->array[idx]->refcount;
199 _bfd_elf_strtab_clear_all_refs (struct elf_strtab_hash *tab)
203 for (idx = 1; idx < tab->size; ++idx)
204 tab->array[idx]->refcount = 0;
208 _bfd_elf_strtab_size (struct elf_strtab_hash *tab)
210 return tab->sec_size ? tab->sec_size : tab->size;
214 _bfd_elf_strtab_offset (struct elf_strtab_hash *tab, bfd_size_type idx)
220 BFD_ASSERT (idx < tab->size);
221 BFD_ASSERT (tab->sec_size);
222 entry = tab->array[idx];
225 return tab->array[idx]->u.index;
229 _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab)
236 for (i = 1; i < tab->size; ++i)
241 BFD_ASSERT (tab->array[i]->refcount == 0);
242 len = tab->array[i]->len;
246 str = tab->array[i]->root.string;
253 BFD_ASSERT (off == tab->sec_size);
298 _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab)
310 amt = tab->size * sizeof (struct elf_strtab_hash_entry *);
315 for (i = 1, a = array; i < tab->size; ++i)
317 e = tab->array[i];
370 for (i = 1; i < tab->size; ++i)
372 e = tab->array[i];
380 tab->sec_size = size;
383 for (i = 1; i < tab->size; ++i)
385 e = tab->array[i];