aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-model.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-27 01:26:30 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-29 20:08:10 -0400
commitba9666525f68ab75a7176bd02b7e8d0dc8c644b7 (patch)
tree603fa4516138f61109686c9c35d73d4b6dbeb563 /sim/common/sim-model.h
parentaa2e84dee612c8fe1d8249891a9f8fea1e4be492 (diff)
downloadbinutils-ba9666525f68ab75a7176bd02b7e8d0dc8c644b7.zip
binutils-ba9666525f68ab75a7176bd02b7e8d0dc8c644b7.tar.gz
binutils-ba9666525f68ab75a7176bd02b7e8d0dc8c644b7.tar.bz2
sim: model: constify sim_machs storage
The array of pointers is never modified, so mark it const so it ends up in the read-only data section.
Diffstat (limited to 'sim/common/sim-model.h')
-rw-r--r--sim/common/sim-model.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/common/sim-model.h b/sim/common/sim-model.h
index 3a028d5..d6edf64 100644
--- a/sim/common/sim-model.h
+++ b/sim/common/sim-model.h
@@ -140,7 +140,7 @@ typedef struct model {
/* ??? In a simulator of multiple architectures, will need multiple copies of
this. Have an `archs' array that contains a pointer to the machs array
for each (which in turn has a pointer to the models array for each). */
-extern const SIM_MACH *sim_machs[];
+extern const SIM_MACH * const sim_machs[];
/* Model module handlers. */
extern MODULE_INSTALL_FN sim_model_install;