- int htab_size = BLOCK_HASHTABLE_SIZE (i);
-
- block = (struct block *)
- obstack_alloc (&objfile->symbol_obstack,
- (sizeof (struct block) +
- ((htab_size - 1) * sizeof (struct symbol *))));
- for (j = 0; j < htab_size; j++)
- {
- BLOCK_BUCKET (block, j) = 0;
- }
- BLOCK_BUCKETS (block) = htab_size;
- for (next = *listhead; next; next = next->next)
- {
- for (j = next->nsyms - 1; j >= 0; j--)
- {
- struct symbol *sym;
- unsigned int hash_index;
- const char *name = SYMBOL_DEMANGLED_NAME (next->symbol[j]);
- if (name == NULL)
- name = DEPRECATED_SYMBOL_NAME (next->symbol[j]);
- hash_index = msymbol_hash_iw (name);
- hash_index = hash_index % BLOCK_BUCKETS (block);
- sym = BLOCK_BUCKET (block, hash_index);
- BLOCK_BUCKET (block, hash_index) = next->symbol[j];
- next->symbol[j]->hash_next = sym;
- }
- }