This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH]: Fix building sh-symbianelf toolchain
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Mon, 07 Aug 2006 15:06:10 +0100
- Subject: [PATCH]: Fix building sh-symbianelf toolchain
Hi Guys,
I am applying the patch below to fix a small problem with the recent
SH vxworks patch. That patch stopped the sh-symbianelf target from
building because the sh-symbianelf target does not create the vxwork
target vectors but the function vxworks_object_p() unconditionally
used those vectors.
Cheers
Nick
bfd/ChangeLog
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.
Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.139
diff -c -3 -p -r1.139 elf32-sh.c
*** bfd/elf32-sh.c 4 Aug 2006 13:13:55 -0000 1.139
--- bfd/elf32-sh.c 7 Aug 2006 14:01:06 -0000
*************** static reloc_howto_type sh_vxworks_howto
*** 74,86 ****
/* Return true if OUTPUT_BFD is a VxWorks object. */
static bfd_boolean
! vxworks_object_p (bfd *abfd)
{
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);
}
/* Return the howto table for ABFD. */
--- 74,90 ----
/* Return true if OUTPUT_BFD is a VxWorks object. */
static bfd_boolean
! 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. */