2002-06-12 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 13 Jun 2002 02:43:23 +0000 (02:43 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 13 Jun 2002 02:43:23 +0000 (02:43 +0000)
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
false if xvec doesn't match.

ld/ChangeLog
ld/emultempl/elf32.em

index f1701025b485dfc0a3d7c927facaa62c568e23c9..6fb172aa1dc5bc5a892017abfa0451f04bd5697d 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-12  H.J. Lu <hjl@gnu.org>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Return
+       false if xvec doesn't match.
+
 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
 
        * ldlang.c (lang_size_sections_1): Skip removed output sections.
index e854c2a3fbe4670c62e26d21ed9c0402e264b011..cfd0409befe070af7292aa269016db764b31d49c 100644 (file)
@@ -281,6 +281,13 @@ gld${EMULATION_NAME}_try_needed (name, force)
       return false;
     }
 
+  /* For DT_NEEDED, they have to match.  */
+  if (abfd->xvec != output_bfd->xvec)
+    {
+      bfd_close (abfd);
+      return false;
+    }
+
   /* Check whether this object would include any conflicting library
      versions.  If FORCE is set, then we skip this check; we use this
      the second time around, if we couldn't find any compatible