2001-08-30 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 30 Aug 2001 21:26:26 +0000 (21:26 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 30 Aug 2001 21:26:26 +0000 (21:26 +0000)
* elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2 changes.
(_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
relocations for weak definitions.

bfd/ChangeLog
bfd/elf32-mips.c

index afbae91c2f303ea93f048dd9125023f7227925e3..1eba7a82f9d54b7809c67761a9096a002878aee7 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-30  H.J. Lu  <hjl@gnu.org>
+
+       * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
+       2 changes.
+       (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
+       relocations for weak definitions.
+
 2001-08-30  H.J. Lu  <hjl@gnu.org>
 
        * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
index 4d224df5d33b5e2757c415348363a41dcfa10dc4..6eecd5511df9e605509b8e57e9e703b1af6f5796 100644 (file)
@@ -6332,10 +6332,8 @@ mips_elf_calculate_relocation (abfd,
       if ((info->shared
           || (elf_hash_table (info)->dynamic_sections_created
               && h != NULL
-              && h->root.root.type != bfd_link_hash_undefweak
-              && (h->root.root.type == bfd_link_hash_defweak
-                  || (h->root.elf_link_hash_flags
-                      & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+              && ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)
+                  != 0)))
          && (input_section->flags & SEC_ALLOC) != 0)
        {
          /* If we're creating a shared library, or this relocation is
@@ -8135,7 +8133,9 @@ _bfd_mips_elf_adjust_dynamic_symbol (info, h)
   hmips = (struct mips_elf_link_hash_entry *) h;
   if (! info->relocateable
       && hmips->possibly_dynamic_relocs != 0
-      && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+      && (h->root.type == bfd_link_hash_defweak
+         || (h->elf_link_hash_flags 
+             & ELF_LINK_HASH_DEF_REGULAR) == 0))
     {
       mips_elf_allocate_dynamic_relocations (dynobj,
                                             hmips->possibly_dynamic_relocs);