]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2001-03-11 Philip Blundell <philb@gnu.org>
authorPhil Blundell <philb@gnu.org>
Sun, 11 Mar 2001 13:12:59 +0000 (13:12 +0000)
committerPhil Blundell <philb@gnu.org>
Sun, 11 Mar 2001 13:12:59 +0000 (13:12 +0000)
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
entries that could serve as a definition for a weak symbol.

bfd/ChangeLog
bfd/elf32-arm.h

index 3661bf3ae18e9223c0da6d6005b0a662446b70a3..3173d201cfecd021d355bcb403908f7fc31f4525 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-11  Philip Blundell  <philb@gnu.org>
+
+       * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
+       entries that could serve as a definition for a weak symbol.
+
 2001-03-07  Andreas Jaeger  <aj@suse.de>
 
        * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
index abda34ddbe999ed70ac60cd3aeca2632c22463e6..0f2ac8a9d16a40e17b1d89fbf1c9ba3b98a73729 100644 (file)
@@ -3167,6 +3167,13 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
          /* Mark the symbol as undefined, rather than as defined in
             the .plt section.  Leave the value alone.  */
          sym->st_shndx = SHN_UNDEF;
+         /* If the symbol is weak, we do need to clear the value.
+            Otherwise, the PLT entry would provide a definition for
+            the symbol even if the symbol wasn't defined anywhere,
+            and so the symbol would never be NULL.  */
+         if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
+             == 0)
+           sym->st_value = 0;
        }
     }