Copy relocations against protected symbols
[deliverable/binutils-gdb.git] / bfd / elf32-metag.c
index fde454b80e376941b57f079f9a77e5abe6d4ccb2..a68b51cd9b6f8b551cb6d6b3ea53bfc60b3b2652 100644 (file)
@@ -1020,13 +1020,13 @@ metag_link_hash_newfunc (struct bfd_hash_entry *entry,
 /* Free the derived linker hash table.  */
 
 static void
-elf_metag_link_hash_table_free (struct bfd_link_hash_table *btab)
+elf_metag_link_hash_table_free (bfd *obfd)
 {
   struct elf_metag_link_hash_table *htab
-    = (struct elf_metag_link_hash_table *) btab;
+    = (struct elf_metag_link_hash_table *) obfd->link.hash;
 
   bfd_hash_table_free (&htab->bstab);
-  _bfd_elf_link_hash_table_free (btab);
+  _bfd_elf_link_hash_table_free (obfd);
 }
 
 /* Create the derived linker hash table.  The Meta ELF port uses the derived
@@ -1055,8 +1055,11 @@ elf_metag_link_hash_table_create (bfd *abfd)
   /* Init the stub hash table too.  */
   if (!bfd_hash_table_init (&htab->bstab, stub_hash_newfunc,
                            sizeof (struct elf_metag_stub_hash_entry)))
-    return NULL;
-  (void) elf_metag_link_hash_table_free;
+    {
+      _bfd_elf_link_hash_table_free (abfd);
+      return NULL;
+    }
+  htab->etab.root.hash_table_free = elf_metag_link_hash_table_free;
 
   return &htab->etab.root;
 }
@@ -2584,7 +2587,7 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info,
 
   s = htab->sdynbss;
 
-  return _bfd_elf_adjust_dynamic_copy (eh, s);
+  return _bfd_elf_adjust_dynamic_copy (info, eh, s);
 }
 
 /* Allocate space in .plt, .got and associated reloc sections for
This page took 0.027213 seconds and 4 git commands to generate.