Skip to content

Commit 6cf3ddd

Browse files
committed
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.
1 parent 4c337f2 commit 6cf3ddd

File tree

20 files changed

+16
-13
lines changed

20 files changed

+16
-13
lines changed

sim/arm/sim-main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include "sim-basics.h"
2323
#include "sim-base.h"
24-
#include "bfd.h"
2524

2625
#undef BIT
2726
#include "armdefs.h"

sim/common/cgen-trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
2121
#define CGEN_TRACE_H
2222

2323
#include "ansidecl.h"
24+
#include "bfd.h"
2425

2526
void cgen_trace_insn_init (SIM_CPU *, int);
2627
void cgen_trace_insn_fini (SIM_CPU *, const struct argbuf *, int);

sim/common/sim-base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ typedef address_word sim_cia;
7373
typedef struct _sim_cpu SIM_CPU;
7474
typedef struct _sim_cpu sim_cpu;
7575

76+
#include "bfd.h"
77+
7678
#include "sim-module.h"
7779

7880
#include "sim-arange.h"

sim/common/sim-trace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
2525
#include <stdarg.h>
2626

2727
#include "ansidecl.h"
28+
#include "bfd.h"
2829
#include "dis-asm.h"
2930

3031
/* Standard traceable entities. */

sim/cr16/sim-main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include "sim-basics.h"
2323
#include "sim-base.h"
24-
#include "bfd.h"
2524

2625
#include "cr16_sim.h"
2726

sim/cr16/simops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include <time.h>
3232
#include <sys/time.h>
3333

34+
#include "bfd.h"
35+
3436
#include "sim-main.h"
3537
#include "sim-signal.h"
3638
#include "simops.h"

sim/d10v/sim-main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
#include "sim-basics.h"
2323
#include "sim-base.h"
24-
#include "bfd.h"
2524

2625
#include "d10v_sim.h"
2726

sim/d10v/simops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#endif
1111
#include <string.h>
1212

13+
#include "bfd.h"
14+
1315
#include "sim-main.h"
1416
#include "sim-signal.h"
1517
#include "simops.h"

sim/frv/sim-main.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
3131
#include "sim-basics.h"
3232
#include "cgen-types.h"
3333
#include "frv-desc.h"
34+
#include <stdbool.h>
3435
#include "frv-opc.h"
3536
#include "arch.h"
3637

sim/ft32/sim-main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#include "sim-basics.h"
2525
#include "sim-base.h"
26-
#include "bfd.h"
2726

2827
#include "ft32-sim.h"
2928

0 commit comments

Comments
 (0)