From ed71e1110daa51fb1e40bf98ab7b27768be6a123 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 22 Aug 2002 17:27:20 +0000 Subject: [PATCH] Add sh-nto support --- bfd/ChangeLog | 13 +++++++++++++ bfd/Makefile.am | 6 ++++++ bfd/Makefile.in | 6 ++++++ bfd/config.bfd | 5 +++++ bfd/configure | 30 ++++++++++++++++-------------- bfd/configure.in | 2 ++ bfd/elf32-qnx.h | 6 +++--- bfd/elf32-sh.c | 4 ++++ bfd/elf32-shqnx.c | 31 +++++++++++++++++++++++++++++++ bfd/targets.c | 2 ++ gas/ChangeLog | 5 +++++ gas/config/tc-arm.c | 5 ++--- gas/configure | 4 ++-- gas/configure.in | 4 ++-- ld/ChangeLog | 8 ++++++++ ld/Makefile.am | 8 ++++++++ ld/Makefile.in | 8 ++++++++ ld/configure.tgt | 5 ++++- ld/emulparams/shelf_nto.sh | 10 ++++++++++ ld/emulparams/shlelf_nto.sh | 10 ++++++++++ 20 files changed, 147 insertions(+), 25 deletions(-) create mode 100644 bfd/elf32-shqnx.c create mode 100644 ld/emulparams/shelf_nto.sh create mode 100644 ld/emulparams/shlelf_nto.sh diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2cd2064e93..0e7b27030f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +2002-08-22 Graeme Peterson + + * Makefile.am: Add entries for elf32-shqnx.c + * Makefile.in: Regenerate. + * config.bfd: Add support sh-*-nto* target. + * configure.in: Add support for bfd_elf32_sh{l}qnx_vec. + * configure: Regenerate. + * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" . + * elf32-sh.c: Do not include elf32-target.h if + ELF32_SH_C_INCLUDED is defined. + * elf32-shqnx.c: New file: Support for QNX. + * targets.c: Add bfd_elf32_sh{l}qnx_vec. + 2002-08-22 Nick Clifton * po/tr.po: Updated Turkish translation. diff --git a/bfd/Makefile.am b/bfd/Makefile.am index 4913b73afc..d945dc3d35 100644 --- a/bfd/Makefile.am +++ b/bfd/Makefile.am @@ -240,6 +240,7 @@ BFD32_BACKENDS = \ elf32-sh64-com.lo \ elf32-sh-nbsd.lo \ elf32-sh64-nbsd.lo \ + elf32-shqnx.lo \ elf32-sparc.lo \ elf32-v850.lo \ elf32-vax.lo \ @@ -399,6 +400,7 @@ BFD32_BACKENDS_CFILES = \ elf32-sh-lin.c \ elf32-sh-nbsd.c \ elf32-sh64-nbsd.c \ + elf32-shqnx.c \ elf32-sparc.c \ elf32-v850.c \ elf32-vax.c \ @@ -1260,6 +1262,10 @@ elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \ $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-shqnx.lo: elf32-shqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \ diff --git a/bfd/Makefile.in b/bfd/Makefile.in index 6d800484b3..6a137cdbab 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -368,6 +368,7 @@ BFD32_BACKENDS = \ elf32-sh64-com.lo \ elf32-sh-nbsd.lo \ elf32-sh64-nbsd.lo \ + elf32-shqnx.lo \ elf32-sparc.lo \ elf32-v850.lo \ elf32-vax.lo \ @@ -528,6 +529,7 @@ BFD32_BACKENDS_CFILES = \ elf32-sh-lin.c \ elf32-sh-nbsd.c \ elf32-sh64-nbsd.c \ + elf32-shqnx.c \ elf32-sparc.c \ elf32-v850.c \ elf32-vax.c \ @@ -1790,6 +1792,10 @@ elf32-sh64-nbsd.lo: elf32-sh64-nbsd.c elf32-sh64.c \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ $(srcdir)/../opcodes/sh64-opc.h elf32-sh.c $(INCDIR)/elf/sh.h \ $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-shqnx.lo: elf32-shqnx.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h elf32-qnx.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \ diff --git a/bfd/config.bfd b/bfd/config.bfd index a13d99b629..a42ad1fad8 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -994,6 +994,11 @@ case "${targ}" in #endif targ_underscore=yes ;; + sh-*-nto*) + targ_defvec=bfd_elf32_shqnx_vec + targ_selvecs="bfd_elf32_shlqnx_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" + targ_underscore=yes + ;; sh-*-pe) targ_defvec=shlpe_vec targ_selvecs="shlpe_vec shlpei_vec" diff --git a/bfd/configure b/bfd/configure index 34a8f31eaf..cd03dd3cae 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6123,7 +6123,9 @@ do bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + bfd_elf32_shlqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + bfd_elf32_shqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; @@ -6330,10 +6332,10 @@ case ${host64}-${target64}-${want64} in if test -n "$GCC" ; then bad_64bit_gcc=no; echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6 -echo "configure:6334: checking for gcc version with buggy 64-bit support" >&5 +echo "configure:6336: checking for gcc version with buggy 64-bit support" >&5 # Add more tests for gcc versions with non-working 64-bit support here. cat > conftest.$ac_ext <&6 -echo "configure:6382: checking for $ac_hdr" >&5 +echo "configure:6384: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6417,12 +6419,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6421: checking for $ac_func" >&5 +echo "configure:6423: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6470,7 +6472,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6474: checking for working mmap" >&5 +echo "configure:6476: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6478,7 +6480,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -6656,12 +6658,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6660: checking for $ac_func" >&5 +echo "configure:6662: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/bfd/configure.in b/bfd/configure.in index 84cea63914..2f59095714 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -624,7 +624,9 @@ do bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + bfd_elf32_shlqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + bfd_elf32_shqnx_vec) tb="$tb elf32-shqnx.lo elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf32.lo $elf ecofflink.lo" ;; diff --git a/bfd/elf32-qnx.h b/bfd/elf32-qnx.h index 454c2b42ec..d4eefb8150 100644 --- a/bfd/elf32-qnx.h +++ b/bfd/elf32-qnx.h @@ -22,11 +22,11 @@ (start + (segment->p_memsz > segment->p_filesz \ ? segment->p_memsz : segment->p_filesz)) -static boolean elf_i386qnx_copy_private_bfd_data_p +static boolean elf_qnx_copy_private_bfd_data_p PARAMS ((bfd *, asection *, bfd *, asection *)); -static boolean elf_i386qnx_is_contained_by_filepos +static boolean elf_qnx_is_contained_by_filepos PARAMS ((asection *, Elf_Internal_Phdr *)); -static void elf_i386qnx_set_nonloadable_filepos +static void elf_qnx_set_nonloadable_filepos PARAMS ((bfd *, Elf_Internal_Phdr *)); static boolean diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 147483d033..ecde70f620 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -5882,4 +5882,8 @@ sh_elf_reloc_type_class (rela) #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size 12 #define elf_backend_plt_header_size PLT_ENTRY_SIZE + +#ifndef ELF32_SH_C_INCLUDED #include "elf32-target.h" +#endif + diff --git a/bfd/elf32-shqnx.c b/bfd/elf32-shqnx.c new file mode 100644 index 0000000000..a27c0f20fa --- /dev/null +++ b/bfd/elf32-shqnx.c @@ -0,0 +1,31 @@ +/* Hitachi SH QNX specific support for 32-bit ELF + Copyright 2002 Free Software Foundation, Inc. + + This file is part of BFD, the Binary File Descriptor library. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#define ELF32_SH_C_INCLUDED +#include "elf32-sh.c" + +#include "elf32-qnx.h" + +#undef TARGET_LITTLE_SYM +#define TARGET_LITTLE_SYM bfd_elf32_shlqnx_vec +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM bfd_elf32_shqnx_vec + +#include "elf32-target.h" + diff --git a/bfd/targets.c b/bfd/targets.c index ee378284da..093490cf68 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -565,7 +565,9 @@ extern const bfd_target bfd_elf32_shblin_vec; extern const bfd_target bfd_elf32_shl_vec; extern const bfd_target bfd_elf32_shlin_vec; extern const bfd_target bfd_elf32_shlnbsd_vec; +extern const bfd_target bfd_elf32_shlqnx_vec; extern const bfd_target bfd_elf32_shnbsd_vec; +extern const bfd_target bfd_elf32_shqnx_vec; extern const bfd_target bfd_elf32_sparc_vec; extern const bfd_target bfd_elf32_tradbigmips_vec; extern const bfd_target bfd_elf32_tradlittlemips_vec; diff --git a/gas/ChangeLog b/gas/ChangeLog index 861ca0696b..93f62cd387 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-08-12 Graeme Peterson + + * configure.in: Add support for sh-**-nto* target. + * configure: Regenerate. + 2002-08-21 Nitin Gupta * config/tc-h8300.h (TC_LINKRELAX_FIXUP): Define. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 7085a2fdd9..d2d7034114 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -2228,7 +2228,7 @@ add_to_lit_pool () { if (entry >= MAX_LITERAL_POOL_SIZE) { - inst.error = _("Literal Pool Overflow"); + inst.error = _("literal pool overflow"); return FAIL; } @@ -10265,7 +10265,7 @@ tc_gen_reloc (section, fixp) /* If this is called then the a literal has been referenced across a section boundary. */ as_bad_where (fixp->fx_file, fixp->fx_line, - _("Literal referenced across section boundary")); + _("literal referenced across section boundary")); return NULL; #ifdef OBJ_ELF @@ -10512,7 +10512,6 @@ md_assemble (str) -k Generate PIC code -mthumb Start in Thumb mode -mthumb-interwork Code supports ARM/Thumb interworking - -mimplicit-litpool-dump Dump literal pool on section change For now we will also provide support for: diff --git a/gas/configure b/gas/configure index 7348927cd1..aa0f453e52 100755 --- a/gas/configure +++ b/gas/configure @@ -2581,8 +2581,8 @@ EOF sh*-*-netbsdelf*) fmt=elf em=nbsd ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; - sh-*-pe*) fmt=coff em=pe bfd_gas=yes - endian=little ;; + sh-*-nto*) fmt=elf ;; + sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; sh-*-rtemself*) fmt=elf ;; sh-*-rtems*) fmt=coff ;; sh64-*-elf*) fmt=elf ;; diff --git a/gas/configure.in b/gas/configure.in index a0fc678696..7e7016d9ee 100644 --- a/gas/configure.in +++ b/gas/configure.in @@ -425,8 +425,8 @@ changequote([,])dnl sh*-*-netbsdelf*) fmt=elf em=nbsd ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; - sh-*-pe*) fmt=coff em=pe bfd_gas=yes - endian=little ;; + sh-*-nto*) fmt=elf ;; + sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;; sh-*-rtemself*) fmt=elf ;; sh-*-rtems*) fmt=coff ;; sh64-*-elf*) fmt=elf ;; diff --git a/ld/ChangeLog b/ld/ChangeLog index 6794d181a8..6ee0729243 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2002-08-22 Graeme Peterson + + * Makefile.am: Add esh{l}elf_nto.o files. + * Makefile.in: Regenerate. + * configure.tgt: Add support for sh-**-nto* targets. + * emulparams/shelf_nto.sh: New file. + * emulparams/shlelf_nto.sh: New file. + 2002-08-21 John David Anglin * ldlang.c (offsetof): Define if not defined. diff --git a/ld/Makefile.am b/ld/Makefile.am index 46f899d970..41dae4ccc1 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -267,6 +267,8 @@ ALL_EMULATIONS = \ eshlelf_linux.o \ eshelf_nbsd.o \ eshlelf_nbsd.o \ + eshelf_nto.o \ + eshlelf_nto.o \ eshl.o \ eshlelf.o \ eshpe.o \ @@ -1006,11 +1008,17 @@ eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \ $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)" +eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)" eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \ $(srcdir)/emulparams/shelf_nbsd.sh \ $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)" +eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)" eshlelf.c: $(srcdir)/emulparams/shlelf.sh \ $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index c75f0c1add..6cc09cf2ce 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -378,6 +378,8 @@ ALL_EMULATIONS = \ eshlelf_linux.o \ eshelf_nbsd.o \ eshlelf_nbsd.o \ + eshelf_nto.o \ + eshlelf_nto.o \ eshl.o \ eshlelf.o \ eshpe.o \ @@ -1729,11 +1731,17 @@ eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \ $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)" +eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)" eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \ $(srcdir)/emulparams/shelf_nbsd.sh \ $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)" +eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)" eshlelf.c: $(srcdir)/emulparams/shlelf.sh \ $(srcdir)/emulparams/shelf.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff --git a/ld/configure.tgt b/ld/configure.tgt index ffa735c89e..66591650b3 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -232,7 +232,7 @@ arm-*-netbsdelf*) targ_emul=armelf_nbsd; targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;; arm-*-netbsd*) targ_emul=armnbsd; targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd" ;; -arm-**-nto*) targ_emul=armnto ;; +arm-*-nto*) targ_emul=armnto ;; arm-*-openbsd*) targ_emul=armnbsd ;; arm-*-rtems*) targ_emul=armelf ;; arm-*-elf) targ_emul=armelf ;; @@ -307,6 +307,9 @@ sh-*-elf* | sh[1234]*-*-elf | sh-*-rtemself*) targ_emul=shelf targ_extra_emuls="shlelf sh shl" ;; +sh-*-nto*) targ_emul=shelf_nto + targ_extra_emuls=shlelf_nto + ;; sh-*-pe) targ_emul=shpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;; sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;; diff --git a/ld/emulparams/shelf_nto.sh b/ld/emulparams/shelf_nto.sh new file mode 100644 index 0000000000..f2252fb845 --- /dev/null +++ b/ld/emulparams/shelf_nto.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh" +TEXT_START_ADDR=0x08040000 +MAXPAGESIZE=0x1000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +TEXT_START_SYMBOLS='_btext = .;' +ENTRY=_start diff --git a/ld/emulparams/shlelf_nto.sh b/ld/emulparams/shlelf_nto.sh new file mode 100644 index 0000000000..d23e69a6c4 --- /dev/null +++ b/ld/emulparams/shlelf_nto.sh @@ -0,0 +1,10 @@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-shl" +TEXT_START_ADDR=0x08040000 +MAXPAGESIZE=0x1000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes +TEXT_START_SYMBOLS='_btext = .;' +ENTRY=_start