From: Mike Frysinger Date: Fri, 10 Apr 2015 23:40:34 +0000 (-0400) Subject: sim: unify sim-hload X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e744ef887c1e879052cb30783638807190275f8;p=binutils-gdb.git 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. --- diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index 13e026be636..0afff0c5f54 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/aarch64/Makefile.in b/sim/aarch64/Makefile.in index c07a868a031..ecb5fd42051 100644 --- a/sim/aarch64/Makefile.in +++ b/sim/aarch64/Makefile.in @@ -29,7 +29,6 @@ SIM_OBJS = \ cpustate.o \ simulator.o \ memory.o \ - sim-hload.o \ sim-resume.o \ ## COMMON_POST_CONFIG_FRAG diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog index 950a307109b..5cfc633ebc7 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/arm/Makefile.in b/sim/arm/Makefile.in index d23da0acbde..fb0891a40ee 100644 --- a/sim/arm/Makefile.in +++ b/sim/arm/Makefile.in @@ -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 diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog index 62bf5b26f94..d0f63e5b5d8 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/avr/Makefile.in b/sim/avr/Makefile.in index d17e9153306..dc804984dd7 100644 --- a/sim/avr/Makefile.in +++ b/sim/avr/Makefile.in @@ -19,7 +19,6 @@ SIM_OBJS = \ interp.o \ $(SIM_NEW_COMMON_OBJS) \ - sim-hload.o \ sim-resume.o ## COMMON_POST_CONFIG_FRAG diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 4cdc81cf868..cc1b3cc3c6d 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/bfin/Makefile.in b/sim/bfin/Makefile.in index a2b6b0b94e2..8e7e69e5a56 100644 --- a/sim/bfin/Makefile.in +++ b/sim/bfin/Makefile.in @@ -27,7 +27,6 @@ SIM_OBJS = \ gui.o \ interp.o \ machs.o \ - sim-hload.o \ sim-resume.o INCLUDE = bfin-sim.h diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 9d15f640572..ae9484643be 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_NEW_COMMON_OBJS): Add sim-hload.o. + 2015-12-26 Mike Frysinger * acinclude.m4 (AH_BOTTOM): Delete tconfig.h appending. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index d2a84d42a9f..152c3c92cd0 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -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 \ diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 004d729ce45..44e24fe5aba 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/cr16/Makefile.in b/sim/cr16/Makefile.in index e5932181334..3994ddc97ac 100644 --- a/sim/cr16/Makefile.in +++ b/sim/cr16/Makefile.in @@ -19,7 +19,6 @@ SIM_OBJS = \ $(SIM_NEW_COMMON_OBJS) \ - sim-hload.o \ sim-resume.o \ interp.o \ table.o \ diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index f2be067e12b..d6c6b4114d7 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * sim-if.c (cris_program_offset_write, sim_load): Delete. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index 72c0540770e..142bc7b0d02 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -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 diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index d51ede7171d..0ff2c2ba276 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/d10v/Makefile.in b/sim/d10v/Makefile.in index e243066860b..a206991e0bf 100644 --- a/sim/d10v/Makefile.in +++ b/sim/d10v/Makefile.in @@ -20,7 +20,6 @@ SIM_OBJS = \ interp.o \ $(SIM_NEW_COMMON_OBJS) \ - sim-hload.o \ sim-resume.o \ table.o \ simops.o \ diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index d61d12c2f84..c716e6aeae5 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/frv/Makefile.in b/sim/frv/Makefile.in index 0f1ce5140b7..5bf7f20e7bc 100644 --- a/sim/frv/Makefile.in +++ b/sim/frv/Makefile.in @@ -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 \ diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index 0f3941a43c0..7164c7fe6f5 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/ft32/Makefile.in b/sim/ft32/Makefile.in index 090507f565a..00acadd7444 100644 --- a/sim/ft32/Makefile.in +++ b/sim/ft32/Makefile.in @@ -21,7 +21,6 @@ SIM_OBJS = \ $(SIM_NEW_COMMON_OBJS) \ interp.o \ - sim-hload.o \ sim-resume.o ## COMMON_POST_CONFIG_FRAG diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 966c27a77aa..8f760bbfabe 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/iq2000/Makefile.in b/sim/iq2000/Makefile.in index 24c4a9b28b6..6ffdaacad7c 100644 --- a/sim/iq2000/Makefile.in +++ b/sim/iq2000/Makefile.in @@ -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 \ diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index 68e8d619548..a7596a6f178 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/lm32/Makefile.in b/sim/lm32/Makefile.in index 7b7154955da..6a71aceb45b 100644 --- a/sim/lm32/Makefile.in +++ b/sim/lm32/Makefile.in @@ -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 \ diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog index ecbf4cf97bd..6bedd999bba 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/m32r/Makefile.in b/sim/m32r/Makefile.in index d57a984d3a6..7a08c3b047c 100644 --- a/sim/m32r/Makefile.in +++ b/sim/m32r/Makefile.in @@ -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 \ diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 46e243e5864..9fd9e280edb 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/m68hc11/Makefile.in b/sim/m68hc11/Makefile.in index e6aa0487058..de374d6a565 100644 --- a/sim/m68hc11/Makefile.in +++ b/sim/m68hc11/Makefile.in @@ -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 diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog index 1d5fa35a40b..fb80f2c1930 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/mcore/Makefile.in b/sim/mcore/Makefile.in index c94e5bcd4c9..eb664d58217 100644 --- a/sim/mcore/Makefile.in +++ b/sim/mcore/Makefile.in @@ -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 diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index ed97275c6db..9e8837148fc 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/microblaze/Makefile.in b/sim/microblaze/Makefile.in index 1b3e1c301b8..24fa95fb488 100644 --- a/sim/microblaze/Makefile.in +++ b/sim/microblaze/Makefile.in @@ -20,7 +20,6 @@ SIM_OBJS = \ interp.o \ $(SIM_NEW_COMMON_OBJS) \ - sim-hload.o \ sim-resume.o ## COMMON_POST_CONFIG_FRAG diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog index 7d7725d41b1..022f9608954 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/mips/Makefile.in b/sim/mips/Makefile.in index 489e9cf125e..7f1c9163b69 100644 --- a/sim/mips/Makefile.in +++ b/sim/mips/Makefile.in @@ -69,7 +69,6 @@ SIM_OBJS = \ mdmx.o \ dsp.o \ sim-main.o \ - sim-hload.o \ sim-resume.o \ diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 65fa03efab1..a159aa4cf0c 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (MN10300_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/mn10300/Makefile.in b/sim/mn10300/Makefile.in index 2b96dd73e35..7ebd4f59e29 100644 --- a/sim/mn10300/Makefile.in +++ b/sim/mn10300/Makefile.in @@ -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 diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 016c61f5af9..10477b499fd 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/moxie/Makefile.in b/sim/moxie/Makefile.in index 2d605f5e4c8..686152d8cb0 100644 --- a/sim/moxie/Makefile.in +++ b/sim/moxie/Makefile.in @@ -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 diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog index 0d57e7f46af..f790a664f8f 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/msp430/Makefile.in b/sim/msp430/Makefile.in index 9d687c9a34e..91473afc230 100644 --- a/sim/msp430/Makefile.in +++ b/sim/msp430/Makefile.in @@ -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. diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index b744ac29400..14c4b184147 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/sh/Makefile.in b/sim/sh/Makefile.in index d8f4e360882..f87dd65b294 100644 --- a/sim/sh/Makefile.in +++ b/sim/sh/Makefile.in @@ -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 diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog index 7fc3982cb53..945ec35c4fb 100644 --- a/sim/sh64/ChangeLog +++ b/sim/sh64/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/sh64/Makefile.in b/sim/sh64/Makefile.in index aa84c8d35ac..903eecfb03c 100644 --- a/sim/sh64/Makefile.in +++ b/sim/sh64/Makefile.in @@ -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 \ diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 14fe2ebdd64..e09ad1a1685 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2015-12-27 Mike Frysinger + + * Makefile.in (SIM_OBJS): Delete sim-hload.o. + 2015-12-26 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in index 9f53fcd1dea..1d9c0269f36 100644 --- a/sim/v850/Makefile.in +++ b/sim/v850/Makefile.in @@ -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.