]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elflink.c
_bfd_elf_link_hash_hide_symbol calls in generic ELF code
[thirdparty/binutils-gdb.git] / bfd / elflink.c
index 1a990582cbd41441bd4d2401095b517e8d81049e..b1b5ca7376a7045b03b4e16434da4c43b5d38acd 100644 (file)
@@ -2808,7 +2808,7 @@ static bfd_boolean
 _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
 {
   struct elf_info_failed *eif = (struct elf_info_failed *) data;
-  bfd *dynobj;
+  struct elf_link_hash_table *htab;
   const struct elf_backend_data *bed;
 
   if (! is_elf_hash_table (eif->info->hash))
@@ -2822,10 +2822,13 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
   if (! _bfd_elf_fix_symbol_flags (h, eif))
     return FALSE;
 
+  htab = elf_hash_table (eif->info);
+  bed = get_elf_backend_data (htab->dynobj);
+
   if (h->root.type == bfd_link_hash_undefweak)
     {
       if (eif->info->dynamic_undefined_weak == 0)
-       _bfd_elf_link_hash_hide_symbol (eif->info, h, TRUE);
+       (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE);
       else if (eif->info->dynamic_undefined_weak > 0
               && h->ref_regular
               && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -2921,9 +2924,6 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
       (_("warning: type and size of dynamic symbol `%s' are not defined"),
        h->root.root.string);
 
-  dynobj = elf_hash_table (eif->info)->dynobj;
-  bed = get_elf_backend_data (dynobj);
-
   if (! (*bed->elf_backend_adjust_dynamic_symbol) (eif->info, h))
     {
       eif->failed = TRUE;
@@ -14284,7 +14284,9 @@ bfd_elf_define_start_stop (struct bfd_link_info *info,
       if (symbol[0] == '.')
        {
          /* .startof. and .sizeof. symbols are local.  */
-         _bfd_elf_link_hash_hide_symbol (info, h, TRUE);
+         const struct elf_backend_data *bed;
+         bed = get_elf_backend_data (info->output_bfd);
+         (*bed->elf_backend_hide_symbol) (info, h, TRUE);
        }
       else if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
        h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_PROTECTED;