head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.48 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.46 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.44 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.42 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.40 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.38 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.36 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.34 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.32 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.30 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.28 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.26 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.24 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.22 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.20 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.18 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.16 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.14 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.12 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.10 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.8 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.6 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.4 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.2 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.1.0.14 pkgsrc-2004Q2-base:1.1 pkgsrc-2004Q1:1.1.0.12 pkgsrc-2004Q1-base:1.1 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1 netbsd-1-5-PATCH001:1.1; locks; strict; comment @# @; 1.2 date 2004.07.09.20.43.48; author kristerw; state dead; branches; next 1.1; 1.1 date 2001.01.04.01.18.08; author itojun; state Exp; branches; next ; desc @@ 1.2 log @Update to binutils-2.15. Changes since binutils-2.9 are not easy to summarize, since it represent more than 6 years of active development... Solves PR pkg/13442. @ text @$NetBSD: patch-sh,v 1.1 2001/01/04 01:18:08 itojun Exp $ ftp://ftp.netbsd.org/pub/NetBSD/arch/sh3/crosskit/ diff -u -r -N -x *.orig -x CVS old/bfd/Makefile.am binutils-2.9.1/bfd/Makefile.am --- bfd/Makefile.am Wed Jan 3 20:40:59 2001 +++ bfd/Makefile.am Wed Jan 3 20:44:17 2001 @@@@ -153,6 +153,7 @@@@ elf-m10200.lo \ elf-m10300.lo \ elf32-ppc.lo \ + elf32-shunx.lo \ elf32-sh.lo \ elf32-sparc.lo \ elf32-v850.lo \ @@@@ -260,6 +261,7 @@@@ elf-m10200.c \ elf-m10300.c \ elf32-ppc.c \ + elf32-shunx.c \ elf32-sh.c \ elf32-sparc.c \ elf32-v850.c \ @@@@ -797,6 +799,9 @@@@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/ppc.h elf32-target.h +elf32-shunx.lo: elf32-shunx.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + elf32-target.h elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ elf32-target.h diff -u -r -N -x *.orig -x CVS old/bfd/Makefile.in binutils-2.9.1/bfd/Makefile.in --- bfd/Makefile.in Wed Jan 3 20:40:59 2001 +++ bfd/Makefile.in Wed Jan 3 20:44:04 2001 @@@@ -242,6 +242,7 @@@@ elf-m10200.lo \ elf-m10300.lo \ elf32-ppc.lo \ + elf32-shunx.lo \ elf32-sh.lo \ elf32-sparc.lo \ elf32-v850.lo \ @@@@ -349,6 +350,7 @@@@ elf-m10200.c \ elf-m10300.c \ elf32-ppc.c \ + elf32-shunx.c \ elf32-sh.c \ elf32-sparc.c \ elf32-v850.c \ @@@@ -1254,6 +1256,9 @@@@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/ppc.h elf32-target.h +elf32-shunx.lo: elf32-shunx.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + elf32-target.h elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ elf32-target.h diff -u -r -N -x *.orig -x CVS old/bfd/config.bfd binutils-2.9.1/bfd/config.bfd --- bfd/config.bfd Wed Jan 3 20:55:42 2001 +++ bfd/config.bfd Wed Jan 3 20:46:00 2001 @@@@ -40,6 +40,7 @@@@ powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; sparc*) targ_archs=bfd_sparc_arch ;; +sh*) targ_archs=bfd_sh_arch ;; v850*) targ_archs=bfd_v850_arch ;; z8k*) targ_archs=bfd_z8k_arch ;; *) targ_archs=bfd_${targ_cpu}_arch ;; @@@@ -494,14 +495,34 @@@@ targ_defvec=rs6000coff_vec ;; + sh-*-netbsdelf) + targ_defvec=bfd_elf32_shunx_vec + targ_selvecs="bfd_elf32_shlunx_vec shcoff_vec shlcoff_vec " + targ_underscore=yes + ;; + shel-*-netbsdelf) + targ_defvec=bfd_elf32_shlunx_vec + targ_selvecs="bfd_elf32_shunx_vec shcoff_vec shlcoff_vec " + targ_underscore=yes + ;; sh-*-elf*) targ_defvec=bfd_elf32_sh_vec - targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" + targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec " + targ_underscore=yes + ;; + sh-*-netbsdcoff) + targ_defvec=shcoff_vec + targ_selvecs="shlcoff_vec " + targ_underscore=yes + ;; + shel-*-netbsdcoff) + targ_defvec=shlcoff_vec + targ_selvecs="shcoff_vec " targ_underscore=yes ;; sh-*-* | sh-*-rtems*) targ_defvec=shcoff_vec - targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" + targ_selvecs="shlcoff_vec " targ_underscore=yes ;; diff -u -r -N -x *.orig -x CVS old/bfd/configure binutils-2.9.1/bfd/configure --- bfd/configure Wed Jan 3 20:40:59 2001 +++ bfd/configure Wed Jan 3 20:46:23 2001 @@@@ -2738,6 +2738,8 @@@@ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; + bfd_elf32_shunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;; + bfd_elf32_shlunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; diff -u -r -N -x *.orig -x CVS old/bfd/configure.in binutils-2.9.1/bfd/configure.in --- bfd/configure.in Wed Jan 3 20:40:59 2001 +++ bfd/configure.in Wed Jan 3 20:46:30 2001 @@@@ -423,6 +423,8 @@@@ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; + bfd_elf32_shunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;; + bfd_elf32_shlunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; diff -u -r -N -x *.orig -x CVS old/bfd/elf32-sh.c binutils-2.9.1/bfd/elf32-sh.c --- bfd/elf32-sh.c Sat May 2 00:48:09 1998 +++ bfd/elf32-sh.c Wed Jan 3 20:47:15 2001 @@@@ -1889,13 +1889,28 @@@@ return NULL; } +#ifndef TARGET_BIG_SYM #define TARGET_BIG_SYM bfd_elf32_sh_vec +#endif + +#ifndef TARGET_BIG_NAME #define TARGET_BIG_NAME "elf32-sh" +#endif + +#ifndef TARGET_LITTLE_SYM #define TARGET_LITTLE_SYM bfd_elf32_shl_vec +#endif + +#ifndef TARGET_LITTLE_NAME #define TARGET_LITTLE_NAME "elf32-shl" +#endif + #define ELF_ARCH bfd_arch_sh #define ELF_MACHINE_CODE EM_SH + +#ifndef ELF_MAXPAGESIZE #define ELF_MAXPAGESIZE 0x1 +#endif #define elf_symbol_leading_char '_' diff -u -r -N -x *.orig -x CVS old/bfd/elf32-shunx.c binutils-2.9.1/bfd/elf32-shunx.c --- bfd/elf32-shunx.c Thu Jan 1 09:00:00 1970 +++ bfd/elf32-shunx.c Wed Jan 3 20:47:30 2001 @@@@ -0,0 +1,7 @@@@ +#define TARGET_BIG_SYM bfd_elf32_shunx_vec +#define TARGET_BIG_NAME "elf32-sh-unx" +#define TARGET_LITTLE_SYM bfd_elf32_shlunx_vec +#define TARGET_LITTLE_NAME "elf32-shl-unx" +#define ELF_MAXPAGESIZE 0x1000 + +#include "elf32-sh.c" diff -u -r -N -x *.orig -x CVS old/bfd/targets.c binutils-2.9.1/bfd/targets.c --- bfd/targets.c Wed Jan 3 20:40:59 2001 +++ bfd/targets.c Wed Jan 3 20:47:40 2001 @@@@ -504,6 +504,8 @@@@ extern const bfd_target bfd_elf32_mn10300_vec; extern const bfd_target bfd_elf32_powerpc_vec; extern const bfd_target bfd_elf32_powerpcle_vec; +extern const bfd_target bfd_elf32_shunx_vec; +extern const bfd_target bfd_elf32_shlunx_vec; extern const bfd_target bfd_elf32_sh_vec; extern const bfd_target bfd_elf32_shl_vec; extern const bfd_target bfd_elf32_sparc_vec; diff -u -r -N -x *.orig -x CVS old/config.sub binutils-2.9.1/config.sub --- config.sub Wed Jan 3 20:41:00 2001 +++ config.sub Wed Jan 3 20:47:56 2001 @@@@ -175,7 +175,7 @@@@ | arme[lb] | pyramid | mn10200 | mn10300 \ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \ - | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ + | we32k | ns16k | clipper | i370 | sh | shel | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 \ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \ | mipstx39 | mipstx39el \ @@@@ -229,7 +229,7 @@@@ | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \ | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \ | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparclite-* | pdp11-* | sh-* | shel-* | powerpc-* | powerpcle-* \ | sparc64-* | mips64-* | mipsel-* | mipseb-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mipstx39-* | mipstx39el-* \ diff -u -r -N -x *.orig -x CVS old/ld/Makefile.am binutils-2.9.1/ld/Makefile.am --- ld/Makefile.am Wed Jan 3 20:40:59 2001 +++ ld/Makefile.am Wed Jan 3 20:49:44 2001 @@@@ -169,6 +169,10 @@@@ eshelf.o \ eshlelf.o \ eshl.o \ + eshunx.o \ + eshlunx.o \ + eelf32shunx.o \ + eelf32shlunx.o \ esparcaout.o \ esparclinux.o \ esparclynx.o \ @@@@ -488,6 +492,18 @@@@ eshl.c: $(srcdir)/emulparams/shl.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} ${GENSCRIPTS} shl "$(tdir_shl)" +eshunx.c: $(srcdir)/emulparams/shunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shunx "$(tdir_shunx)" +eshlunx.c: $(srcdir)/emulparams/shlunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shlunx "$(tdir_shlunx)" +eelf32shunx.c: $(srcdir)/emulparams/elf32shunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32shunx "$(tdir_elf32shunx)" +eelf32shlunx.c: $(srcdir)/emulparams/elf32shlunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32shlunx "$(tdir_elf32shlunx)" esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)" diff -u -r -N -x *.orig -x CVS old/ld/Makefile.in binutils-2.9.1/ld/Makefile.in --- ld/Makefile.in Wed Jan 3 20:40:59 2001 +++ ld/Makefile.in Wed Jan 3 20:49:38 2001 @@@@ -245,6 +245,10 @@@@ eshelf.o \ eshlelf.o \ eshl.o \ + eshunx.o \ + eshlunx.o \ + eelf32shunx.o \ + eelf32shlunx.o \ esparcaout.o \ esparclinux.o \ esparclynx.o \ @@@@ -998,6 +1002,18 @@@@ eshl.c: $(srcdir)/emulparams/shl.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} ${GENSCRIPTS} shl "$(tdir_shl)" +eshunx.c: $(srcdir)/emulparams/shunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shunx "$(tdir_shunx)" +eshlunx.c: $(srcdir)/emulparams/shlunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} shlunx "$(tdir_shlunx)" +eelf32shunx.c: $(srcdir)/emulparams/elf32shunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32shunx "$(tdir_elf32shunx)" +eelf32shlunx.c: $(srcdir)/emulparams/elf32shlunx.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32shlunx "$(tdir_elf32shlunx)" esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)" diff -u -r -N -x *.orig -x CVS old/ld/configure.tgt binutils-2.9.1/ld/configure.tgt --- ld/configure.tgt Wed Jan 3 20:41:00 2001 +++ ld/configure.tgt Wed Jan 3 20:51:01 2001 @@@@ -114,8 +114,16 @@@@ targ_extra_emuls="h8500s h8500b h8500m h8500c" ;; sh-*-elf*) targ_emul=shelf - targ_extra_emuls="shlelf sh shl" + targ_extra_emuls="shlelf shunx shlunx" ;; +sh-*-netbsdelf) targ_emul=elf32shunx + targ_extra_emuls="elf32shlunx shunx shlunx" + ;; +shel-*-netbsdelf) targ_emul=elf32shlunx + targ_extra_emuls="elf32shunx shunx shlunx" + ;; +sh-*-netbsdcoff) targ_emul=shunx; targ_extra_emuls=shlunx ;; +shel-*-netbsdcoff) targ_emul=shlunx; targ_extra_emuls=shunx ;; sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;; m68k-sony-*) targ_emul=news ;; m68k-hp-bsd*) targ_emul=hp300bsd ;; diff -u -r -N -x *.orig -x CVS old/ld/emulparams/elf32shlunx.sh binutils-2.9.1/ld/emulparams/elf32shlunx.sh --- ld/emulparams/elf32shlunx.sh Thu Jan 1 09:00:00 1970 +++ ld/emulparams/elf32shlunx.sh Wed Jan 3 20:51:16 2001 @@@@ -0,0 +1,15 @@@@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-shl-unx" +TEXT_START_ADDR=0x1000 +MAXPAGESIZE=0x1000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +# These are for compatibility with the COFF toolchain. +ENTRY=start +CTOR_START='___ctors = .;' +CTOR_END='___ctors_end = .;' +DTOR_START='___dtors = .;' +DTOR_END='___dtors_end = .;' diff -u -r -N -x *.orig -x CVS old/ld/emulparams/elf32shunx.sh binutils-2.9.1/ld/emulparams/elf32shunx.sh --- ld/emulparams/elf32shunx.sh Thu Jan 1 09:00:00 1970 +++ ld/emulparams/elf32shunx.sh Wed Jan 3 20:51:33 2001 @@@@ -0,0 +1,15 @@@@ +SCRIPT_NAME=elf +OUTPUT_FORMAT="elf32-sh-unx" +TEXT_START_ADDR=0x1000 +MAXPAGESIZE=0x1000 +ARCH=sh +MACHINE= +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +# These are for compatibility with the COFF toolchain. +ENTRY=start +CTOR_START='___ctors = .;' +CTOR_END='___ctors_end = .;' +DTOR_START='___dtors = .;' +DTOR_END='___dtors_end = .;' diff -u -r -N -x *.orig -x CVS old/ld/emulparams/shlunx.sh binutils-2.9.1/ld/emulparams/shlunx.sh --- ld/emulparams/shlunx.sh Thu Jan 1 09:00:00 1970 +++ ld/emulparams/shlunx.sh Wed Jan 3 20:51:54 2001 @@@@ -0,0 +1,5 @@@@ +SCRIPT_NAME=shunx +OUTPUT_FORMAT="coff-shl" +TEXT_START_ADDR=0x1000 +TARGET_PAGE_SIZE=0x1000 +ARCH=sh diff -u -r -N -x *.orig -x CVS old/ld/emulparams/shunx.sh binutils-2.9.1/ld/emulparams/shunx.sh --- ld/emulparams/shunx.sh Thu Jan 1 09:00:00 1970 +++ ld/emulparams/shunx.sh Wed Jan 3 20:52:04 2001 @@@@ -0,0 +1,5 @@@@ +SCRIPT_NAME=shunx +OUTPUT_FORMAT="coff-sh" +TEXT_START_ADDR=0x1000 +TARGET_PAGE_SIZE=0x1000 +ARCH=sh diff -u -r -N -x *.orig -x CVS old/ld/scripttempl/shunx.sc binutils-2.9.1/ld/scripttempl/shunx.sc --- ld/scripttempl/shunx.sc Thu Jan 1 09:00:00 1970 +++ ld/scripttempl/shunx.sc Wed Jan 3 20:52:24 2001 @@@@ -0,0 +1,53 @@@@ +TORS=".tors : + { + ___ctors = . ; + *(.ctors) + ___ctors_end = . ; + ___dtors = . ; + *(.dtors) + ___dtors_end = . ; + }" + + +cat <