/* The relocation table used for SHT_RELA sections. */
-static reloc_howto_type howto_table[] =
+static const reloc_howto_type howto_table[] =
{
/* No relocation. */
HOWTO (R_RISCV_NONE, /* type */
false) /* pcrel_offset */
};
-static reloc_howto_type howto_table_internal[] =
+static const reloc_howto_type howto_table_internal[] =
{
/* R_RISCV_DELETE. */
EMPTY_HOWTO (0),
const riscv_subset_t *);
};
/* Please added in order since this table is only run once time. */
-static struct riscv_implicit_subset riscv_implicit_subsets[] =
+static const struct riscv_implicit_subset riscv_implicit_subsets[] =
{
{"g", "+i,+m,+a,+f,+d,+zicsr,+zifencei", check_implicit_always},
{"e", "+i", check_implicit_always},
};
/* This table records the mapping form RISC-V Profiles into march string. */
-static struct riscv_profiles riscv_profiles_table[] =
+static const struct riscv_profiles riscv_profiles_table[] =
{
/* RVI20U only contains the base extension 'i' as mandatory extension. */
{"rvi20u64", "rv64i"},
/* The standard extensions must be added in canonical order. */
-static struct riscv_supported_ext riscv_supported_std_ext[] =
+static const struct riscv_supported_ext riscv_supported_std_ext[] =
{
{"e", ISA_SPEC_CLASS_20191213, 1, 9, 0 },
{"e", ISA_SPEC_CLASS_20190608, 1, 9, 0 },
{NULL, 0, 0, 0, 0}
};
-static struct riscv_supported_ext riscv_supported_std_z_ext[] =
+static const struct riscv_supported_ext riscv_supported_std_z_ext[] =
{
{"zic64b", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"ziccamoa", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{NULL, 0, 0, 0, 0}
};
-static struct riscv_supported_ext riscv_supported_std_s_ext[] =
+static const struct riscv_supported_ext riscv_supported_std_s_ext[] =
{
{"sha", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"shcounterenw", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{NULL, 0, 0, 0, 0}
};
-static struct riscv_supported_ext riscv_supported_std_zxm_ext[] =
+static const struct riscv_supported_ext riscv_supported_std_zxm_ext[] =
{
{NULL, 0, 0, 0, 0}
};
-static struct riscv_supported_ext riscv_supported_vendor_x_ext[] =
+static const struct riscv_supported_ext riscv_supported_vendor_x_ext[] =
{
{"xcvalu", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"xcvbi", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{NULL, 0, 0, 0, 0}
};
-const struct riscv_supported_ext *riscv_all_supported_ext[] =
+static const struct riscv_supported_ext *riscv_all_supported_ext[] =
{
riscv_supported_std_ext,
riscv_supported_std_z_ext,
static bool
riscv_known_prefixed_ext (const char *ext,
- struct riscv_supported_ext *known_exts)
+ const struct riscv_supported_ext *known_exts)
{
size_t i;
for (i = 0; known_exts[i].name != NULL; ++i)
|| *default_isa_spec == ISA_SPEC_CLASS_NONE)
return;
- struct riscv_supported_ext *table = NULL;
+ const struct riscv_supported_ext *table = NULL;
enum riscv_prefix_ext_class class = riscv_get_prefix_class (name);
switch (class)
{
static void
riscv_parse_add_implicit_subsets (riscv_parse_subset_t *rps)
{
- struct riscv_implicit_subset *t = riscv_implicit_subsets;
+ const struct riscv_implicit_subset *t = riscv_implicit_subsets;
for (; t->ext; t++)
{
riscv_subset_t *subset = NULL;