[PATCH] opcodes/riscv: make riscv_options[] const
Jan Beulich
jbeulich@suse.com
Mon Jul 28 16:01:28 GMT 2025
There's no reason to allow the array to be modifiable. In fact the
compiler is able to infer this, placing the array in .data.rel.ro, but
let's make it explicit.
--- a/opcodes/riscv-dis.c
+++ b/opcodes/riscv-dis.c
@@ -1610,7 +1610,7 @@ typedef enum
/* Valid RISCV disassembler options. */
-static struct
+static const struct
{
const char *name;
const char *description;
More information about the Binutils
mailing list