aboutsummaryrefslogtreecommitdiff
path: root/bfd/targets.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1992-08-28 00:08:13 +0000
committerIan Lance Taylor <ian@airs.com>1992-08-28 00:08:13 +0000
commit8e3d11580a618ef60a4581c69d9db5fced2ddd9c (patch)
tree270b7f72c2a84ec5204bf56d14e2a705dbccc1e0 /bfd/targets.c
parentde0f17d8901e9fa35a53915983d4c422c52681f0 (diff)
downloadgdb-8e3d11580a618ef60a4581c69d9db5fced2ddd9c.zip
gdb-8e3d11580a618ef60a4581c69d9db5fced2ddd9c.tar.gz
gdb-8e3d11580a618ef60a4581c69d9db5fced2ddd9c.tar.bz2
Thu Aug 27 17:01:04 1992 Ian Lance Taylor (ian@cygnus.com)
* targets.c, config/i960-bout.mt, hosts/*: added HOST_BIG_ENDIAN_DEFAULT_VECTOR and HOST_LITTLE_ENDIAN_DEFAULT_VECTOR because bout archive format depends on the endianness of the host. Added #define HOST_BIG_ENDIAN_P and #undef HOST_BIG_ENDIAN_P to a number of configuration files in hosts/ (it was already in some).
Diffstat (limited to 'bfd/targets.c')
-rw-r--r--bfd/targets.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/bfd/targets.c b/bfd/targets.c
index 8cd9fff..49a8196 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -401,10 +401,27 @@ extern bfd_target hppa_vec;
#ifdef DEFAULT_VECTOR
extern bfd_target DEFAULT_VECTOR;
#endif
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+extern bfd_target HOST_BIG_ENDIAN_DEFAULT_VECTOR;
+#endif
+#ifdef HOST_LITTLE_ENDIAN_DEFAULT_VECTOR
+extern bfd_target HOST_LITTLE_ENDIAN_DEFAULT_VECTOR;
+#endif
#ifdef SELECT_VECS
bfd_target *target_vector[] = {
+
+ /* 960 bout format depends on the host, so let targets choose a
+ default vector even if the provide SELECT_VECS. */
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+#ifdef HOST_BIG_ENDIAN_P
+ &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
+#else /* ! defined (HOST_BIG_ENDIAN_P) */
+ &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
+#endif /* ! defined (HOST_BIG_ENDIAN_P) */
+#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
+
SELECT_VECS,
0
};
@@ -415,7 +432,15 @@ bfd_target *target_vector[] = {
#ifdef DEFAULT_VECTOR
&DEFAULT_VECTOR,
-#endif
+#else /* ! defined (DEFAULT_VECTOR) */
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+#ifdef HOST_BIG_ENDIAN_P
+ &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
+#else /* ! defined (HOST_BIG_ENDIAN_P) */
+ &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
+#endif /* ! defined (HOST_BIG_ENDIAN_P) */
+#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
+#endif /* ! defined (DEFAULT_VECTOR) */
&i386coff_vec,
&i386aout_vec,
@@ -465,7 +490,15 @@ bfd_target *target_vector[] = {
bfd_target *default_vector[] = {
#ifdef DEFAULT_VECTOR
&DEFAULT_VECTOR,
-#endif
+#else /* ! defined (DEFAULT_VECTOR) */
+#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR
+#ifdef HOST_BIG_ENDIAN_P
+ &HOST_BIG_ENDIAN_DEFAULT_VECTOR,
+#else /* ! defined (HOST_BIG_ENDIAN_P) */
+ &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR,
+#endif /* ! defined (HOST_BIG_ENDIAN_P) */
+#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */
+#endif /* ! defined (DEFAULT_VECTOR) */
0,
};