* elf32-sh.c (vxworks_object_p): Only check for vxworks target vectors if
authorNick Clifton <nickc@redhat.com>
Mon, 7 Aug 2006 14:03:35 +0000 (14:03 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 7 Aug 2006 14:03:35 +0000 (14:03 +0000)
  they are going to be created.

bfd/ChangeLog
bfd/elf32-sh.c

index 34927fcaa8fcf8fd4ddcc02e6aebcb9b61b26a5b..a30f240e1f578d78609fe8eaf3553c8ecb60a0fd 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-07  Nick Clifton  <nickc@redhat.com>
+
+       * elf32-sh.c (vxworks_object_p): Only check for vxworks target
+       vectors if they are going to be created.
+
 2006-08-07  Nick Clifton  <nickc@redhat.com>
 
        * configure.in (bfd_elf32_shnbsd_vec): Fix typo.
index f0ebd4fbb2c0fb95314c7dbb60d4c8a629b41a7a..849c9c7e3ef3264c28ea72f3e1c0446e4cb98384 100644 (file)
@@ -74,13 +74,17 @@ static reloc_howto_type sh_vxworks_howto_table[] =
 /* Return true if OUTPUT_BFD is a VxWorks object.  */
 
 static bfd_boolean
-vxworks_object_p (bfd *abfd)
+vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED)
 {
+#if !defined INCLUDE_SHMEDIA && !defined SH_TARGET_ALREADY_DEFINED
   extern const bfd_target bfd_elf32_shlvxworks_vec;
   extern const bfd_target bfd_elf32_shvxworks_vec;
 
   return (abfd->xvec == &bfd_elf32_shlvxworks_vec
          || abfd->xvec == &bfd_elf32_shvxworks_vec);
+#else
+  return FALSE;
+#endif
 }
 
 /* Return the howto table for ABFD.  */