* sim-config.c (sim_config): Recognize when a bfd has unspecified
authorHans-Peter Nilsson <hp@axis.com>
Tue, 16 Nov 2004 07:16:57 +0000 (07:16 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Tue, 16 Nov 2004 07:16:57 +0000 (07:16 +0000)
endian information.

sim/common/ChangeLog
sim/common/sim-config.c

index ded6547406c95e15c36f494480d3646b41fe45c1..e35faf57ca6b4e7462117111db7f72efa962145b 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-16  Hans-Peter Nilsson  <hp@axis.com>
 
+       * sim-config.c (sim_config): Recognize when a bfd has unspecified
+       endian information.
+
        * Make-common.in (sim-load.o): Depend on $(sim_main_headers) and
        $(remote_sim_h) too.
        (sim_main_headers): Add sim-utils.h.
index 6fe7b16429d768a854e996c3e786b4818ec46144..87a38fe7e6f6806cafe5362e23c85ed08f55c7fb 100644 (file)
@@ -146,7 +146,11 @@ sim_config (SIM_DESC sd)
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
 
   /* extract all relevant information */
-  if (STATE_PROG_BFD (sd) == NULL)
+  if (STATE_PROG_BFD (sd) == NULL
+      /* If we have a binary input file (presumably with specified
+        "--architecture"), it'll have no endianness.  */
+      || (!bfd_little_endian (STATE_PROG_BFD (sd))
+         && !bfd_big_endian (STATE_PROG_BFD (sd))))
     prefered_target_byte_order = 0;
   else
     prefered_target_byte_order = (bfd_little_endian(STATE_PROG_BFD (sd))
This page took 0.15743 seconds and 4 git commands to generate.