diff options
author | Jason Thorpe <thorpej@netbsd.org> | 2002-06-04 02:57:44 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@netbsd.org> | 2002-06-04 02:57:44 +0000 |
commit | 5b0e55b627d80fe3220036737d639cbba71a3e1e (patch) | |
tree | 03cc0e77bfbabcf054498cd8f7077d57997f4d11 /gas/config | |
parent | a074e149a5779e77e3dfe44c07ed215dca1fefae (diff) | |
download | gdb-5b0e55b627d80fe3220036737d639cbba71a3e1e.zip gdb-5b0e55b627d80fe3220036737d639cbba71a3e1e.tar.gz gdb-5b0e55b627d80fe3220036737d639cbba71a3e1e.tar.bz2 |
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.
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.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-sh64.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gas/config/tc-sh64.c b/gas/config/tc-sh64.c index 423913c..6ac77b8 100644 --- a/gas/config/tc-sh64.c +++ b/gas/config/tc-sh64.c @@ -2948,6 +2948,24 @@ sh64_target_format () return "FIXME: No linux target yet"; #endif +#ifdef TE_NetBSD + /* For NetBSD, if the ISA is unspecified, always use SHmedia. */ + if (sh64_isa_mode == sh64_isa_unspecified) + sh64_isa_mode = sh64_isa_shmedia; + + /* If the ABI is unspecified, select a default: based on how + we were configured: sh64 == sh64_abi_64, else sh64_abi_32. */ + if (sh64_abi == sh64_abi_unspecified) + { + if (sh64_isa_mode == sh64_isa_shcompact) + sh64_abi = sh64_abi_32; + else if (strncmp (TARGET_CPU, "sh64", 4) == 0) + sh64_abi = sh64_abi_64; + else + sh64_abi = sh64_abi_32; + } +#endif + if (sh64_abi == sh64_abi_64 && sh64_isa_mode == sh64_isa_unspecified) sh64_isa_mode = sh64_isa_shmedia; @@ -2979,6 +2997,12 @@ sh64_target_format () if (sh64_pt32 && ! sh64_expand) as_bad (_("-expand-pt32 invalid together with -no-expand")); +#ifdef TE_NetBSD + if (sh64_abi == sh64_abi_64) + return (target_big_endian ? "elf64-sh64-nbsd" : "elf64-sh64l-nbsd"); + else + return (target_big_endian ? "elf32-sh64-nbsd" : "elf32-sh64l-nbsd"); +#else /* When the ISA is not one of SHmedia or SHcompact, use the old SH object format. */ if (sh64_isa_mode == sh64_isa_unspecified) @@ -2987,6 +3011,7 @@ sh64_target_format () return (target_big_endian ? "elf64-sh64" : "elf64-sh64l"); else return (target_big_endian ? "elf32-sh64" : "elf32-sh64l"); +#endif } /* The worker function of TARGET_MACH. */ |