* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
authorRichard Sandiford <rdsandiford@googlemail.com>
Wed, 9 Jul 2003 11:48:17 +0000 (11:48 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Wed, 9 Jul 2003 11:48:17 +0000 (11:48 +0000)
initialize a GOT entry to the symbol's st_value.

bfd/ChangeLog
bfd/elfxx-mips.c

index c5a8cc7151d331440bf333a8ad35ff50edb6afde..6b5d783c1f63221d1190ee547acd7459f85d4d3b 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
+       initialize a GOT entry to the symbol's st_value.
+
 2003-07-08  Alan Modra  <amodra@bigpond.net.au>
 
        * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
index 801903f8efdcde345cca3c5fbf29a9dfff78f322..986ba697f5b2f66ea71a2f211a814fefac274e04 100644 (file)
@@ -6732,22 +6732,7 @@ _bfd_mips_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
       bfd_vma offset;
       bfd_vma value;
 
-      if (sym->st_value)
-       value = sym->st_value;
-      else
-       {
-         /* For an entity defined in a shared object, this will be
-            NULL.  (For functions in shared objects for
-            which we have created stubs, ST_VALUE will be non-NULL.
-            That's because such the functions are now no longer defined
-            in a shared object.)  */
-
-         if ((info->shared && h->root.type == bfd_link_hash_undefined)
-             || h->root.type == bfd_link_hash_undefweak)
-           value = 0;
-         else
-           value = h->root.u.def.value;
-       }
+      value = sym->st_value;
       offset = mips_elf_global_got_index (dynobj, output_bfd, h);
       MIPS_ELF_PUT_WORD (output_bfd, value, sgot->contents + offset);
     }