* elf32-mips.c (mips_elf_calculate_relocation): Restore
authorMark Mitchell <mark@codesourcery.com>
Tue, 3 Aug 1999 16:58:26 +0000 (16:58 +0000)
committerMark Mitchell <mark@codesourcery.com>
Tue, 3 Aug 1999 16:58:26 +0000 (16:58 +0000)
_DYNAMIC_LINK handling and handling of undefined symbols in shared
libraries.

bfd/ChangeLog
bfd/elf32-mips.c

index 487589aac29c5a4b9d2df72bda9aa010452921be..980c633d324ea4842e9b7e103d58486fecfd8877 100644 (file)
@@ -1,3 +1,9 @@
+1999-08-03  Mark Mitchell  <mark@codesourcery.com>
+
+       * elf32-mips.c (mips_elf_calculate_relocation): Restore
+       _DYNAMIC_LINK handling and handling of undefined symbols in shared
+       libraries.
+
 1999-08-03  Ian Lance Taylor  <ian@zembu.com>
 
        * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
index 945d3a5afee1a2767f532b09548095a5531114a1..dd2c55ce0b0a02784ce2ea8588ac97464953a21e 100644 (file)
@@ -5877,6 +5877,19 @@ mips_elf_calculate_relocation (abfd,
           and check to see if they exist by looking at their
           addresses.  */
        symbol = 0;
+      else if (info->shared && !info->symbolic && !info->no_undefined)
+       relocation = 0;
+      else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
+       {
+         /* If this is a dynamic link, we should have created a
+            _DYNAMIC_LINK symbol in mips_elf_create_dynamic_sections.
+            Otherwise, we should define the symbol with a value of 0.
+            FIXME: It should probably get into the symbol table
+            somehow as well.  */
+         BFD_ASSERT (! info->shared);
+         BFD_ASSERT (bfd_get_section_by_name (abfd, ".dynamic") == NULL);
+         relocation = 0;
+       }
       else
        {
          (*info->callbacks->undefined_symbol)