summaryrefslogtreecommitdiff
path: root/gas/config/tc-sh64.c
diff options
context:
space:
mode:
authorStephen Clarke <stephen.clarke@earthling.net>2002-10-09 19:07:43 +0000
committerStephen Clarke <stephen.clarke@earthling.net>2002-10-09 19:07:43 +0000
commit4360a1a0604cc8ac0f2edc1858a64a2e65f7d896 (patch)
tree906e4662e81b0b597b630cae6d8b87bcd4ef7ddf /gas/config/tc-sh64.c
parentdb77c03f994b507a10e02426c8e109525bb4c2b0 (diff)
downloadbinutils-redhat-4360a1a0604cc8ac0f2edc1858a64a2e65f7d896.tar.gz
* config/tc-sh64.c (sh64_target_format): Add support for sh64
Linux environment.
Diffstat (limited to 'gas/config/tc-sh64.c')
-rw-r--r--gas/config/tc-sh64.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gas/config/tc-sh64.c b/gas/config/tc-sh64.c
index 6ac77b853d..8d899fbefb 100644
--- a/gas/config/tc-sh64.c
+++ b/gas/config/tc-sh64.c
@@ -2944,10 +2944,6 @@ s_sh64_abi (ignore)
const char *
sh64_target_format ()
{
-#ifdef TE_LINUX
- 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)
@@ -2966,6 +2962,14 @@ sh64_target_format ()
}
#endif
+#ifdef TE_LINUX
+ if (sh64_isa_mode == sh64_isa_unspecified)
+ sh64_isa_mode = sh64_isa_shmedia;
+
+ if (sh64_abi == sh64_abi_unspecified)
+ sh64_abi = sh64_abi_32;
+#endif
+
if (sh64_abi == sh64_abi_64 && sh64_isa_mode == sh64_isa_unspecified)
sh64_isa_mode = sh64_isa_shmedia;
@@ -3002,6 +3006,11 @@ sh64_target_format ()
return (target_big_endian ? "elf64-sh64-nbsd" : "elf64-sh64l-nbsd");
else
return (target_big_endian ? "elf32-sh64-nbsd" : "elf32-sh64l-nbsd");
+#elif defined (TE_LINUX)
+ if (sh64_abi == sh64_abi_64)
+ return (target_big_endian ? "elf64-sh64big-linux" : "elf64-sh64-linux");
+ else
+ return (target_big_endian ? "elf32-sh64big-linux" : "elf32-sh64-linux");
#else
/* When the ISA is not one of SHmedia or SHcompact, use the old SH
object format. */