SEC_NEVER_LOAD flag is not the one we want, because that one
still implies that the section takes up space in the output
file. */
- abfd->sections = NULL;
- abfd->section_count = 0;
+ bfd_section_list_clear (abfd);
/* If this is the first dynamic object found in the link, create
the special sections required for dynamic linking. */
{
case STV_INTERNAL:
case STV_HIDDEN:
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (info, h);
- _bfd_elf_strtab_delref (hash_table->dynstr,
- h->dynstr_index);
+ (*bed->elf_backend_hide_symbol) (info, h, true);
break;
}
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
{
struct elf_backend_data *bed;
+ boolean force_local;
bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj);
- if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
- || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN)
- {
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- _bfd_elf_strtab_delref (elf_hash_table (eif->info)->dynstr,
- h->dynstr_index);
- }
- (*bed->elf_backend_hide_symbol) (eif->info, h);
+
+ force_local = (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL
+ || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN);
+ (*bed->elf_backend_hide_symbol) (eif->info, h, force_local);
}
/* If this is a weak defined symbol in a dynamic object, and we know
struct bfd_elf_version_expr *d;
len = p - h->root.root.string;
- alc = bfd_alloc (sinfo->output_bfd, (bfd_size_type) len);
+ alc = bfd_malloc ((bfd_size_type) len);
if (alc == NULL)
return false;
strncpy (alc, h->root.root.string, len - 1);
&& info->shared
&& ! info->export_dynamic)
{
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (info, h);
- _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
- h->dynstr_index);
+ (*bed->elf_backend_hide_symbol) (info, h, true);
}
break;
}
}
- bfd_release (sinfo->output_bfd, alc);
+ free (alc);
break;
}
}
&& info->shared
&& ! info->export_dynamic)
{
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (info, h);
- _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
- h->dynstr_index);
+ (*bed->elf_backend_hide_symbol) (info, h, true);
}
break;
}
&& info->shared
&& ! info->export_dynamic)
{
- h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
- (*bed->elf_backend_hide_symbol) (info, h);
- _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
- h->dynstr_index);
+ (*bed->elf_backend_hide_symbol) (info, h, true);
}
}
}