From 8a0e0f38af77d6c38cdf9a257b55b4a06ce09124 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 24 Feb 2000 19:37:32 +0000 Subject: [PATCH] Add support for WinCE targeted toolchains. --- binutils/ChangeLog | 8 ++++++++ binutils/configure | 12 +++++++++++- binutils/configure.in | 12 +++++++++++- binutils/dlltool.c | 8 ++++++++ binutils/rescoff.c | 12 +++++++++--- 5 files changed, 47 insertions(+), 5 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 7cc5855..6ebe4b4 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,11 @@ +2000-02-24 Nick Clifton + + * configure.in: Add arm-wince, mips-pe and sh-pe targets. + * configure: Regenerate. + + * dlltoolc.: Add support for sh-pe and mips-pe targets. + * rescoff.c: Add support for sh-pe and mips-pe targets. + 2000-02-23 H.J. Lu * readelf.c (get_osabi_name): Handle ELFOSABI_LINUX. diff --git a/binutils/configure b/binutils/configure index 9c2e03d..fc17d34 100755 --- a/binutils/configure +++ b/binutils/configure @@ -5176,7 +5176,7 @@ do *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; esac case $targ in - arm-*pe*) + arm-*pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -5201,6 +5201,16 @@ do DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; + sh*-*-*pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; + mips*-*-*pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; mcore-*pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" diff --git a/binutils/configure.in b/binutils/configure.in index cc5eb70..603ccd3 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -182,7 +182,7 @@ changequote([,])dnl *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; esac case $targ in - arm-*pe*) + arm-*pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' @@ -209,6 +209,16 @@ changequote([,])dnl DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; + sh*-*-*pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; + mips*-*-*pe) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; mcore-*pe) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE" diff --git a/binutils/dlltool.c b/binutils/dlltool.c index ae2b568..4189b5e 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -394,6 +394,14 @@ static const char *mname = "i386"; static const char *mname = "ppc"; #endif +#ifdef DLLTOOL_SH +static const char *mname = "sh"; +#endif + +#ifdef DLLTOOL_MIPS +static const char *mname = "mips"; +#endif + #ifdef DLLTOOL_MCORE static const char * mname = "mcore-le"; #endif diff --git a/binutils/rescoff.c b/binutils/rescoff.c index fe2487a..64cf572 100644 --- a/binutils/rescoff.c +++ b/binutils/rescoff.c @@ -1,5 +1,5 @@ /* rescoff.c -- read and write resources in Windows COFF files. - Copyright 1997, 1998 Free Software Foundation, Inc. + Copyright 1997, 1998, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GNU Binutils. @@ -447,14 +447,20 @@ write_coff_file (filename, target, resources) if (! bfd_set_format (abfd, bfd_object)) bfd_fatal ("bfd_set_format"); -#ifdef DLLTOOL_ARM +#if defined DLLTOOL_SH + if (! bfd_set_arch_mach (abfd, bfd_arch_sh, 0)) + bfd_fatal ("bfd_set_arch_mach(sh)"); +#elif defined DLLTOOL_MIPS + if (! bfd_set_arch_mach (abfd, bfd_arch_mips, 0)) + bfd_fatal ("bfd_set_arch_mach(mips)"); +#elif defined DLLTOOL_ARM if (! bfd_set_arch_mach (abfd, bfd_arch_arm, 0)) bfd_fatal ("bfd_set_arch_mach(arm)"); #else /* FIXME: This is obviously i386 specific. */ if (! bfd_set_arch_mach (abfd, bfd_arch_i386, 0)) bfd_fatal ("bfd_set_arch_mach(i386)"); -#endif /* arm */ +#endif if (! bfd_set_file_flags (abfd, HAS_SYMS | HAS_RELOC)) bfd_fatal ("bfd_set_file_flags"); -- 2.7.4