From f4f8cce440a38bf606aab597fd9ccb324f0fee87 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Fri, 28 Jan 2005 03:28:40 +0000 Subject: * callback.c (default_callback): Initialize target_endian. (cb_store_target_endian): Renamed from store, new first parameter host_callback *cb, drop last parameter big_p. Take endianness from cb. (cb_host_to_target_stat): Change to use cb_store_target_endian. Remove variable big_p. * nrun.c (main): Initialize default_callback.target_endian. --- sim/common/nrun.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sim/common/nrun.c') diff --git a/sim/common/nrun.c b/sim/common/nrun.c index d0c43e6ad93..ed1d1ea9da7 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -82,6 +82,12 @@ main (int argc, char **argv) abort (); } + /* We can't set the endianness in the callback structure until + sim_config is called, which happens in sim_open. */ + default_callback.target_endian + = (CURRENT_TARGET_BYTE_ORDER == BIG_ENDIAN + ? BFD_ENDIAN_BIG : BFD_ENDIAN_LITTLE); + /* Was there a program to run? */ prog_argv = STATE_PROG_ARGV (sd); prog_bfd = STATE_PROG_BFD (sd); -- cgit v1.2.1