From 6cf3ddd23ec1cf33f4b9f82d267e79741a2fdc48 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 22 Dec 2022 22:01:19 -0500 Subject: sim: move bfd.h include out of sim-main.h Not all arches include this in sim-main.h, and the ones that do don't actually use bfd defines in the sim-main.h header. Prune it to make sim-main.h simpler so we can kill it off entirely in the future. We add the include to the files that utilize e.g. bfd_vma though. --- sim/arm/sim-main.h | 1 - sim/common/cgen-trace.h | 1 + sim/common/sim-base.h | 2 ++ sim/common/sim-trace.h | 1 + sim/cr16/sim-main.h | 1 - sim/cr16/simops.c | 2 ++ sim/d10v/sim-main.h | 1 - sim/d10v/simops.c | 2 ++ sim/frv/sim-main.h | 1 + sim/ft32/sim-main.h | 1 - sim/h8300/sim-main.h | 2 -- sim/m68hc11/interp.c | 2 ++ sim/m68hc11/interrupts.c | 2 ++ sim/m68hc11/sim-main.h | 2 -- sim/mcore/sim-main.h | 1 - sim/mips/sim-main.h | 1 - sim/moxie/sim-main.h | 1 - sim/riscv/interp.c | 2 ++ sim/rx/gdb-if.c | 1 + sim/v850/sim-main.h | 2 -- 20 files changed, 16 insertions(+), 13 deletions(-) diff --git a/sim/arm/sim-main.h b/sim/arm/sim-main.h index bdc5019..5ca01eb 100644 --- a/sim/arm/sim-main.h +++ b/sim/arm/sim-main.h @@ -21,7 +21,6 @@ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" #undef BIT #include "armdefs.h" diff --git a/sim/common/cgen-trace.h b/sim/common/cgen-trace.h index 3e2b4a9..f236857 100644 --- a/sim/common/cgen-trace.h +++ b/sim/common/cgen-trace.h @@ -21,6 +21,7 @@ along with this program. If not, see . */ #define CGEN_TRACE_H #include "ansidecl.h" +#include "bfd.h" void cgen_trace_insn_init (SIM_CPU *, int); void cgen_trace_insn_fini (SIM_CPU *, const struct argbuf *, int); diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h index 796666d..46bf905 100644 --- a/sim/common/sim-base.h +++ b/sim/common/sim-base.h @@ -73,6 +73,8 @@ typedef address_word sim_cia; typedef struct _sim_cpu SIM_CPU; typedef struct _sim_cpu sim_cpu; +#include "bfd.h" + #include "sim-module.h" #include "sim-arange.h" diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h index 8d4ab13..d7cba2d 100644 --- a/sim/common/sim-trace.h +++ b/sim/common/sim-trace.h @@ -25,6 +25,7 @@ along with this program. If not, see . */ #include #include "ansidecl.h" +#include "bfd.h" #include "dis-asm.h" /* Standard traceable entities. */ diff --git a/sim/cr16/sim-main.h b/sim/cr16/sim-main.h index 188c32c..a54a365 100644 --- a/sim/cr16/sim-main.h +++ b/sim/cr16/sim-main.h @@ -21,7 +21,6 @@ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" #include "cr16_sim.h" diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c index d58c0c9..6eefe1b 100644 --- a/sim/cr16/simops.c +++ b/sim/cr16/simops.c @@ -31,6 +31,8 @@ #include #include +#include "bfd.h" + #include "sim-main.h" #include "sim-signal.h" #include "simops.h" diff --git a/sim/d10v/sim-main.h b/sim/d10v/sim-main.h index a6462d8..4e6771a 100644 --- a/sim/d10v/sim-main.h +++ b/sim/d10v/sim-main.h @@ -21,7 +21,6 @@ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" #include "d10v_sim.h" diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index 9883b3f..a2eb367 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -10,6 +10,8 @@ #endif #include +#include "bfd.h" + #include "sim-main.h" #include "sim-signal.h" #include "simops.h" diff --git a/sim/frv/sim-main.h b/sim/frv/sim-main.h index 5fbf94d..2ad7571 100644 --- a/sim/frv/sim-main.h +++ b/sim/frv/sim-main.h @@ -31,6 +31,7 @@ along with this program. If not, see . */ #include "sim-basics.h" #include "cgen-types.h" #include "frv-desc.h" +#include #include "frv-opc.h" #include "arch.h" diff --git a/sim/ft32/sim-main.h b/sim/ft32/sim-main.h index e160a12..5c84f9e 100644 --- a/sim/ft32/sim-main.h +++ b/sim/ft32/sim-main.h @@ -23,7 +23,6 @@ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" #include "ft32-sim.h" diff --git a/sim/h8300/sim-main.h b/sim/h8300/sim-main.h index 84bb346..c034699 100644 --- a/sim/h8300/sim-main.h +++ b/sim/h8300/sim-main.h @@ -1,7 +1,5 @@ /* Main header for the Hitachi h8/300 architecture. */ -#include "bfd.h" - #ifndef SIM_MAIN_H #define SIM_MAIN_H diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c index 2620060..89c6449 100644 --- a/sim/m68hc11/interp.c +++ b/sim/m68hc11/interp.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ /* This must come before any other includes. */ #include "defs.h" +#include "bfd.h" + #include "sim-main.h" #include "sim-assert.h" #include "sim-hw.h" diff --git a/sim/m68hc11/interrupts.c b/sim/m68hc11/interrupts.c index ee65f43..5b3d48f 100644 --- a/sim/m68hc11/interrupts.c +++ b/sim/m68hc11/interrupts.c @@ -20,6 +20,8 @@ along with this program. If not, see . */ /* This must come before any other includes. */ #include "defs.h" +#include "bfd.h" + #include "sim-main.h" #include "sim-options.h" #include "sim-signal.h" diff --git a/sim/m68hc11/sim-main.h b/sim/m68hc11/sim-main.h index e47bd83..f320bf1 100644 --- a/sim/m68hc11/sim-main.h +++ b/sim/m68hc11/sim-main.h @@ -23,8 +23,6 @@ along with this program. If not, see . */ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" - #include "opcode/m68hc11.h" #include "sim/sim.h" diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h index 7290e02..684ec39 100644 --- a/sim/mcore/sim-main.h +++ b/sim/mcore/sim-main.h @@ -21,7 +21,6 @@ along with this program. If not, see . */ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" /* The machine state. This state is maintained in host byte order. The diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h index 9ec6c12..696a1bc 100644 --- a/sim/mips/sim-main.h +++ b/sim/mips/sim-main.h @@ -25,7 +25,6 @@ mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ER #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" #include "elf-bfd.h" #include "elf/mips.h" diff --git a/sim/moxie/sim-main.h b/sim/moxie/sim-main.h index c4be80e..d0df1e9 100644 --- a/sim/moxie/sim-main.h +++ b/sim/moxie/sim-main.h @@ -22,7 +22,6 @@ along with this program. If not, see . */ #include "sim-basics.h" #include "sim-base.h" -#include "bfd.h" #define PCIDX 17 diff --git a/sim/riscv/interp.c b/sim/riscv/interp.c index 50b5a51..6bd0bf2 100644 --- a/sim/riscv/interp.c +++ b/sim/riscv/interp.c @@ -21,6 +21,8 @@ /* This must come before any other includes. */ #include "defs.h" +#include "bfd.h" + #include "sim/callback.h" #include "sim-main.h" #include "sim-options.h" diff --git a/sim/rx/gdb-if.c b/sim/rx/gdb-if.c index caa7ddb..edc99e6 100644 --- a/sim/rx/gdb-if.c +++ b/sim/rx/gdb-if.c @@ -29,6 +29,7 @@ along with this program. If not, see . */ #include #include "ansidecl.h" +#include "bfd.h" #include "libiberty.h" #include "sim/callback.h" #include "sim/sim.h" diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index abf2ed7..9d56469 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -11,8 +11,6 @@ #include "sim-base.h" #include "simops.h" -#include "bfd.h" - typedef uint32_t reg_t; typedef uint64_t reg64_t; -- cgit v1.1