(elf32_arm_adjust_dynamic_symbol): Update ELF_LINK_HASH_NEEDS_PLT logic.
authorNick Clifton <nickc@redhat.com>
Thu, 19 Sep 2002 14:59:51 +0000 (14:59 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 19 Sep 2002 14:59:51 +0000 (14:59 +0000)
bfd/ChangeLog
bfd/elf32-arm.h

index f758a77dd3cf729c1852a8bc79c1bd6096e5538f..14aadb57f0a6a886541ee9aa63d6cc0178ab0600 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
+
+       * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
+       ELF_LINK_HASH_NEEDS_PLT logic.
+
 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
 
        * elfcode.h (elf_slurp_reloc_table_from_section): Check
index e8538ac3ff2ccab5b4362a9e9d9095f571247063..2d59601fd022aaafec11e29d93b0ce387c5b490c 100644 (file)
@@ -2966,16 +2966,22 @@ elf32_arm_adjust_dynamic_symbol (info, h)
   if (h->type == STT_FUNC
       || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
     {
+      /* If we link a program (not a DSO), we'll get rid of unnecessary
+        PLT entries; we point to the actual symbols -- even for pic
+        relocs, because a program built with -fpic should have the same
+        result as one built without -fpic, specifically considering weak
+        symbols.
+        FIXME: m68k and i386 differ here, for unclear reasons.  */
       if (! info->shared
-         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
-         && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
+         && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0)
        {
          /* This case can occur if we saw a PLT32 reloc in an input
-             file, but the symbol was never referred to by a dynamic
-             object.  In such a case, we don't actually need to build
-             a procedure linkage table, and we can just do a PC32
-             reloc instead.  */
+            file, but the symbol was not defined by a dynamic object.
+            In such a case, we don't actually need to build a
+            procedure linkage table, and we can just do a PC32 reloc
+            instead.  */
          BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
+         h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
          return true;
        }
 
This page took 0.030821 seconds and 4 git commands to generate.