sim: unify sim-hload

Pretty much all targets are using this module already, so add it to the
common list of objects.  The only oddball out here is cris and that's
because it supports loading via an offset for all the phdrs.  We drop
support for that.
This commit is contained in:
Mike Frysinger 2015-04-10 19:40:34 -04:00
parent 1b393626ce
commit 5e744ef887
46 changed files with 93 additions and 67 deletions

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -29,7 +29,6 @@ SIM_OBJS = \
cpustate.o \
simulator.o \
memory.o \
sim-hload.o \
sim-resume.o \
## COMMON_POST_CONFIG_FRAG

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -23,7 +23,6 @@ SIM_EXTRA_LIBS = -lm
SIM_OBJS = \
wrapper.o \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
armemu26.o armemu32.o arminit.o armos.o armsupp.o \
armvirt.o thumbemu.o \
armcopro.o maverick.o iwmmxt.o

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -19,7 +19,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
sim-resume.o
## COMMON_POST_CONFIG_FRAG

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -27,7 +27,6 @@ SIM_OBJS = \
gui.o \
interp.o \
machs.o \
sim-hload.o \
sim-resume.o
INCLUDE = bfin-sim.h

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_NEW_COMMON_OBJS): Add sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* acinclude.m4 (AH_BOTTOM): Delete tconfig.h appending.

View File

@ -185,6 +185,7 @@ SIM_NEW_COMMON_OBJS = \
sim-engine.o \
sim-events.o \
sim-fpu.o \
sim-hload.o \
sim-hrw.o \
sim-io.o \
sim-info.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -19,7 +19,6 @@
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
sim-resume.o \
interp.o \
table.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* sim-if.c (cris_program_offset_write, sim_load): Delete.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -318,52 +318,6 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
return TRUE;
}
/* Helper for sim_load (needed just for ELF files): like sim_write,
but offset load at cris_program_offset offset. */
static int
cris_program_offset_write (SIM_DESC sd, SIM_ADDR mem, unsigned char *buf,
int length)
{
return sim_write (sd, mem + cris_program_offset, buf, length);
}
/* Replacement for ../common/sim-hload.c:sim_load, so we can treat ELF
files differently. */
SIM_RC
sim_load (SIM_DESC sd, const char *prog_name, struct bfd *prog_bfd,
int from_tty ATTRIBUTE_UNUSED)
{
bfd *result_bfd;
if (bfd_get_flavour (prog_bfd) != bfd_target_elf_flavour)
{
SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
if (sim_analyze_program (sd, prog_name, prog_bfd) != SIM_RC_OK)
return SIM_RC_FAIL;
SIM_ASSERT (STATE_PROG_BFD (sd) != NULL);
result_bfd = sim_load_file (sd, STATE_MY_NAME (sd),
STATE_CALLBACK (sd),
prog_name,
STATE_PROG_BFD (sd),
STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG,
STATE_LOAD_AT_LMA_P (sd),
sim_write);
if (result_bfd == NULL)
{
bfd_close (STATE_PROG_BFD (sd));
STATE_PROG_BFD (sd) = NULL;
return SIM_RC_FAIL;
}
return SIM_RC_OK;
}
return cris_load_elf_file (sd, prog_bfd, cris_program_offset_write)
? SIM_RC_OK : SIM_RC_FAIL;
}
/* Cover function of sim_state_free to free the cpu buffers as well. */
static void

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
sim-resume.o \
table.o \
simops.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -21,7 +21,6 @@ FRV_OBJS = frv.o cpu.o decode.o sem.o model.o mloop.o cgen-par.o
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
cgen-utils.o cgen-trace.o cgen-scache.o cgen-fpu.o cgen-accfp.o \
cgen-run.o \
sim-if.o arch.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -21,7 +21,6 @@
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
interp.o \
sim-hload.o \
sim-resume.o
## COMMON_POST_CONFIG_FRAG

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -21,7 +21,6 @@ IQ2000_OBJS = iq2000.o cpu.o decode.o sem.o model.o mloop.o
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
cgen-utils.o cgen-trace.o cgen-scache.o \
cgen-run.o \
sim-if.o arch.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -6,7 +6,6 @@
# List of object files, less common parts.
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
cgen-utils.o cgen-trace.o cgen-scache.o \
cgen-run.o \
sim-if.o arch.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -26,7 +26,6 @@ TRAPS_OBJ = @traps_obj@
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
cgen-utils.o cgen-trace.o cgen-scache.o \
cgen-run.o \
sim-if.o arch.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -22,7 +22,6 @@ M68HC11_OBJS = interp.o m68hc11int.o m68hc12int.o \
SIM_OBJS = $(M68HC11_OBJS) \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
sim-resume.o
SIM_PROFILE= -DPROFILE=1 -DWITH_PROFILE=-1

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -23,7 +23,6 @@ NL_TARGET = -DNL_TARGET_mcore
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
sim-resume.o
## COMMON_POST_CONFIG_FRAG

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
sim-resume.o
## COMMON_POST_CONFIG_FRAG

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -69,7 +69,6 @@ SIM_OBJS = \
mdmx.o \
dsp.o \
sim-main.o \
sim-hload.o \
sim-resume.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (MN10300_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -21,7 +21,6 @@ MN10300_OBJS = \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
$(SIM_NEW_COMMON_OBJS) \
op_utils.o \
sim-hload.o \
sim-resume.o
SIM_OBJS = $(MN10300_OBJS) interp.o

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -22,7 +22,6 @@ dtbdir = @datadir@/gdb/dtb
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
interp.o \
sim-hload.o \
sim-resume.o
SIM_EXTRA_LIBS = -lm -lz

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -28,7 +28,6 @@ SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
msp430-sim.o \
trace.o \
sim-hload.o \
sim-resume.o
# List of extra dependencies.

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -20,7 +20,6 @@
SIM_OBJS = \
interp.o \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
table.o
SIM_EXTRA_LIBS = -lm
SIM_EXTRA_CLEAN = sh-clean

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -23,7 +23,6 @@ SH64_OBJS = sh64.o cpu.o sh-desc.o \
SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
sim-hload.o \
cgen-utils.o cgen-trace.o cgen-scache.o \
cgen-run.o \
sim-if.o arch.o \

View File

@ -1,3 +1,7 @@
2015-12-27 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (SIM_OBJS): Delete sim-hload.o.
2015-12-26 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.

View File

@ -23,7 +23,6 @@ SIM_OBJS = \
$(SIM_NEW_COMMON_OBJS) \
simops.o interp.o \
itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
sim-hload.o \
sim-resume.o
# List of extra dependencies.