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.
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))