/* The __ehdr_start symbol. */
struct elf_link_hash_entry *hehdr_start;
- /* A pointer to information used to merge SEC_MERGE sections. */
- void *merge_info;
-
/* Used to link stabs in sections. */
struct stab_info stab_info;
secdata = elf_section_data (sec);
if (! _bfd_add_merge_section (obfd,
- &elf_hash_table (info)->merge_info,
+ &info->hash->merge_info,
sec, &secdata->sec_info))
return false;
else if (secdata->sec_info)
sec->sec_info_type = SEC_INFO_TYPE_MERGE;
}
- if (elf_hash_table (info)->merge_info != NULL)
- return _bfd_merge_sections (obfd, info, elf_hash_table (info)->merge_info,
+ if (info->hash->merge_info != NULL)
+ return _bfd_merge_sections (obfd, info, info->hash->merge_info,
merge_sections_remove_hook);
return true;
}
htab = (struct elf_link_hash_table *) obfd->link.hash;
if (htab->dynstr != NULL)
_bfd_elf_strtab_free (htab->dynstr);
- _bfd_merge_sections_free (htab->merge_info);
/* NB: htab->dynamic->contents is always allocated by bfd_realloc. */
if (htab->dynamic != NULL)
{
{
/* Arrange for destruction of this hash table on closing ABFD. */
table->hash_table_free = _bfd_generic_link_hash_table_free;
+ table->merge_info = NULL;
abfd->link.hash = table;
abfd->is_linker_output = true;
}
BFD_ASSERT (obfd->is_linker_output && obfd->link.hash);
ret = (struct generic_link_hash_table *) obfd->link.hash;
+ _bfd_merge_sections_free (ret->root.merge_info);
bfd_hash_table_free (&ret->root.table);
free (ret);
obfd->link.hash = NULL;
struct bfd_link_hash_entry *undefs_tail;
/* Function to free the hash table on closing BFD. */
void (*hash_table_free) (bfd *);
+
+ /* A pointer to information used to merge SEC_MERGE sections. */
+ void *merge_info;
+
/* The type of the link hash table. */
enum bfd_link_hash_table_type type;
};