This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFA] Add sh5*-*-netbsd* and sh64*-*-netbsd* targets


The 4 targets added are:

	sh5-*-netbsd*		SH5, big-endian, 32-bit default
	sh5l-*-netbsd*		SH5, little-endian, 32-bit default

	sh64-*-netbsd*		SH5, big-endian, 64-bit default
	sh64l-*-netbsd*		SH5, little-endian, 64-bit default

Changes to config.sub are also needed, will be submitted to config-patches
separately.

I'm particularly interested in a sanity-check on the change to tc-sh64.h.
Without that change, I get a "redefined" warning for that macro (the
original definition comes from tc-sh.h).

Also, bfd/targets.c listed the existing sh64 vectors, but didn't actually
put them in the targets array.  I did the same thing with the new sh64_nbsd
vectors.  What's the right thing to do, here?

The new elf{32,64}-sh64{,l}-nbsd vectors are needed, because NetBSD
does not use a leading underscore for user-visible symbols (this matches
the elf32-sh-nbsd behavior).

OK to commit?

bfd/
	* Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
	(BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
	(BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
	(elf32-sh64-nbsd.lo)
	(elf64-sh64-nbsd.lo): New rules.
	* Makefile.in: Regenerate.
	* config.bfd (sh5le-*-netbsd*)
	(sh5-*-netbsd*)
	(sh64le-*-netbsd*)
	(sh64-*-netbsd*): New targets.
	* configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
	bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
	* configure: Regenerate.
	* elf32-sh64-nbsd.c: New file.
	* elf64-sh64-nbsd.c: New file.
	* targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
	bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
	bfd_elf64_sh64lnbsd_vec.

gas/
	* configure.in (sh5*): Set cpu_type to sh64 and endian to big.
	(sh5le*)
	(sh64le*): Set cpu_type to sh64 and endian to little.
	(sh5*-*-netbsd*)
	(sh64*-*-netbsd*): New targets.
	* configure: Regenerate.
	* config/tc-sh64.c (sh64_target_format): Add support for NetBSD
	environment.
	* config/tc-sh64.h (MD_PCREL_FROM_SECTION): Undef before redefining.

ld/
	* Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o,
	eshlelf32_nbsd.o, eshelf64_nbsd.o, and eshlelf64_nbsd.o
	(eshelf32_nbsd.c)
	(eshelf64_nbsd.c)
	(eshlelf32_nbsd.c)
	(eshlelf64_nbsd.c): New rules.
	* Makefile.in: Regenerate.
	* configure.tgt (sh5le-*-netbsd*)
	(sh5-*-netbsd*)
	(sh64le-*-netbsd*)
	(sh64-*-netbsd*): New targets.
	* emulparams/shelf32_nbsd.sh: New file.
	* emulparams/shelf64_nbsd.sh: New file.
	* emulparams/shlelf32_nbsd.sh: New file.
	* emulparams/shlelf64_nbsd.sh: New file.

opcodes/
	* configure.in: Add "sh5*-*" to list of targets which include
	sh64 support.
	* configure: Regenerate.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: sh5-patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]