aboutsummaryrefslogtreecommitdiff
path: root/sim/riscv
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/riscv
parentaa2e84dee612c8fe1d8249891a9f8fea1e4be492 (diff)
downloadgdb-ba9666525f68ab75a7176bd02b7e8d0dc8c644b7.zip
gdb-ba9666525f68ab75a7176bd02b7e8d0dc8c644b7.tar.gz
gdb-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/riscv')
-rw-r--r--sim/riscv/ChangeLog4
-rw-r--r--sim/riscv/machs.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/riscv/ChangeLog b/sim/riscv/ChangeLog
index bcb630a..69c0808 100644
--- a/sim/riscv/ChangeLog
+++ b/sim/riscv/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-29 Mike Frysinger <vapier@gentoo.org>
+
+ * machs.c (sim_machs): Mark const.
+
2021-06-22 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
diff --git a/sim/riscv/machs.c b/sim/riscv/machs.c
index 9ff2303..eb75a1d 100644
--- a/sim/riscv/machs.c
+++ b/sim/riscv/machs.c
@@ -111,7 +111,7 @@ static const SIM_MACH rv128i_mach =
#endif
/* Order matters here. */
-const SIM_MACH *sim_machs[] =
+const SIM_MACH * const sim_machs[] =
{
#if WITH_TARGET_WORD_BITSIZE >= 128
&rv128i_mach,