This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: add sh-uclinux
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 26 Feb 2007 15:28:46 +0000
- Subject: Re: add sh-uclinux
- References: <45E2F9CE.5000502@codesourcery.com>
Nathan Sidwell wrote:
This patch adds an sh-uclinux target triplet, along with sh1- and sh2-
synonyms.
The results were tested on an sh2-uclinux system.
I blame Dan. He told me using all.diff would blow up and so I used a different
name. But of course, I have a tiny attention span, and forgot in the time it
took me to browse to the directory in my mailer.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2007-02-26 Nathan Sidwell <nathan@codesourcery.com>
bfd/
* config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
gas/
* configure.tgt (sh-*-uclinux, sh[12]-*-uclinux): Specify as elf.
ld/
* Makefile.am (ALL_EMULATIONS): Add eshelf_uclinux.o
(eshelf_uclinux.c): New target.
* Makefile.in: Rebuilt.
* configure.tgt (sh-*-uclinux* | sh[12]-*-uclinux*): New stanza.
* emulparams/shelf_uclinux.sh: New.
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.223
diff -c -3 -p -r1.223 config.bfd
*** bfd/config.bfd 5 Feb 2007 19:50:11 -0000 1.223
--- bfd/config.bfd 26 Feb 2007 14:58:56 -0000
*************** case "${targ}" in
*** 1193,1198 ****
--- 1193,1206 ----
targ_selvecs=bfd_elf32_shblin_vec
;;
+ sh-*-uclinux* | sh[12]-*-uclinux*)
+ targ_defvec=bfd_elf32_sh_vec
+ targ_selvecs="bfd_elf32_shblin_vec bfd_elf32_shlin_vec"
+ #ifdef BFD64
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64lin_vec bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec"
+ #endif
+ ;;
+
#ifdef BFD64
sh5le-*-netbsd*)
targ_defvec=bfd_elf32_sh64lnbsd_vec
Index: gas/configure.tgt
===================================================================
RCS file: /cvs/src/src/gas/configure.tgt,v
retrieving revision 1.34
diff -c -3 -p -r1.34 configure.tgt
*** gas/configure.tgt 7 Feb 2007 17:06:19 -0000 1.34
--- gas/configure.tgt 26 Feb 2007 14:58:58 -0000
*************** case ${generic_target} in
*** 337,343 ****
sh64*-*-netbsd*) fmt=elf em=nbsd ;;
sh*-*-netbsdelf*) fmt=elf em=nbsd ;;
sh*-*-symbianelf*) fmt=elf endian=little ;;
! sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-nto*) fmt=elf ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
--- 337,343 ----
sh64*-*-netbsd*) fmt=elf em=nbsd ;;
sh*-*-netbsdelf*) fmt=elf em=nbsd ;;
sh*-*-symbianelf*) fmt=elf endian=little ;;
! sh-*-elf* | sh-*-uclinux* | sh[12]-*-uclinux*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-nto*) fmt=elf ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.230
diff -c -3 -p -r1.230 Makefile.am
*** ld/Makefile.am 26 Feb 2007 08:58:15 -0000 1.230
--- ld/Makefile.am 26 Feb 2007 14:59:04 -0000
*************** ALL_EMULATIONS = \
*** 364,369 ****
--- 364,370 ----
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_uclinux.o \
eshelf_vxworks.o \
eshlelf_vxworks.o \
eshl.o \
*************** eshlelf_vxworks.c: $(srcdir)/emulparams/
*** 1567,1572 ****
--- 1568,1576 ----
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
${GEN_DEPENDS}
${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
+ eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
Index: ld/Makefile.in
===================================================================
RCS file: /cvs/src/src/ld/Makefile.in,v
retrieving revision 1.244
diff -c -3 -p -r1.244 Makefile.in
*** ld/Makefile.in 26 Feb 2007 08:58:15 -0000 1.244
--- ld/Makefile.in 26 Feb 2007 14:59:07 -0000
*************** ALL_EMULATIONS = \
*** 596,601 ****
--- 596,602 ----
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_uclinux.o \
eshelf_vxworks.o \
eshlelf_vxworks.o \
eshl.o \
*************** eshlelf_vxworks.c: $(srcdir)/emulparams/
*** 2378,2383 ****
--- 2379,2387 ----
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
${GEN_DEPENDS}
${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
+ eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.206
diff -c -3 -p -r1.206 configure.tgt
*** ld/configure.tgt 22 Feb 2007 15:05:42 -0000 1.206
--- ld/configure.tgt 26 Feb 2007 14:59:08 -0000
*************** sh-*-rtemscoff*) targ_emul=sh; targ_extr
*** 511,516 ****
--- 511,519 ----
sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
targ_emul=shelf
targ_extra_emuls="shlelf sh shl" ;;
+ sh-*-uclinux* | sh[12]-*-uclinux*)
+ targ_emul=shelf_uclinux
+ targ_extra_emuls="shelf shlelf sh shl" ;;
sh-*-vxworks) targ_emul=shelf_vxworks
targ_extra_emuls=shlelf_vxworks ;;
sh-*-nto*) targ_emul=shelf_nto
Index: ld/testsuite/ld-i386/tlsdesc.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlsdesc.dd,v
retrieving revision 1.2
diff -c -3 -p -r1.2 tlsdesc.dd
*** ld/testsuite/ld-i386/tlsdesc.dd 30 Jun 2006 14:16:13 -0000 1.2
--- ld/testsuite/ld-i386/tlsdesc.dd 26 Feb 2007 14:59:09 -0000
*************** Disassembly of section .text:
*** 16,22 ****
[0-9a-f]+: 50[ ]+push %eax
[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <fn1\+0xa>
[0-9a-f]+: 5b[ ]+pop %ebx
! [0-9a-f]+: 81 c3 9a 13 00 00[ ]+add \$0x[0-9a-f]+,%ebx
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
--- 16,22 ----
[0-9a-f]+: 50[ ]+push %eax
[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <fn1\+0xa>
[0-9a-f]+: 5b[ ]+pop %ebx
! [0-9a-f]+: 81 c3 .. .. 00 00[ ]+add \$0x[0-9a-f]+,%ebx
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
Index: ld/testsuite/ld-i386/tlsgdesc.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlsgdesc.dd,v
retrieving revision 1.2
diff -c -3 -p -r1.2 tlsgdesc.dd
*** ld/testsuite/ld-i386/tlsgdesc.dd 30 Jun 2006 14:16:13 -0000 1.2
--- ld/testsuite/ld-i386/tlsgdesc.dd 26 Feb 2007 14:59:09 -0000
*************** Disassembly of section .text:
*** 15,21 ****
[0-9a-f]+: 50[ ]+push %eax
[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <.*>
[0-9a-f]+: 5b[ ]+pop %ebx
! [0-9a-f]+: 81 c3 be 11 00 00[ ]+add \$0x[0-9a-f]+,%ebx
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
--- 15,21 ----
[0-9a-f]+: 50[ ]+push %eax
[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <.*>
[0-9a-f]+: 5b[ ]+pop %ebx
! [0-9a-f]+: 81 c3 .. .. 00 00[ ]+add \$0x[0-9a-f]+,%ebx
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
Index: ld/testsuite/ld-i386/tlspic.dd
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-i386/tlspic.dd,v
retrieving revision 1.3
diff -c -3 -p -r1.3 tlspic.dd
*** ld/testsuite/ld-i386/tlspic.dd 11 May 2004 17:08:36 -0000 1.3
--- ld/testsuite/ld-i386/tlspic.dd 26 Feb 2007 14:59:10 -0000
*************** Disassembly of section .text:
*** 16,22 ****
[0-9a-f]+: 50[ ]+push %eax
[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <fn1\+0xa>
[0-9a-f]+: 5b[ ]+pop %ebx
! [0-9a-f]+: 81 c3 42 14 00 00[ ]+add \$0x[0-9a-f]+,%ebx
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
--- 16,22 ----
[0-9a-f]+: 50[ ]+push %eax
[0-9a-f]+: e8 00 00 00 00[ ]+call [0-9a-f]+ <fn1\+0xa>
[0-9a-f]+: 5b[ ]+pop %ebx
! [0-9a-f]+: 81 c3 .. .. 00 00[ ]+add \$0x[0-9a-f]+,%ebx
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *
[0-9a-f]+: 90[ ]+nop *