diff options
author | Marek Pikuła <m.pikula@partner.samsung.com> | 2025-03-27 15:09:15 +0100 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2025-03-28 09:20:50 +0800 |
commit | 0d1f4362682f0c3be74f8d8d8e097e9c4a4d04f2 (patch) | |
tree | 2407f5b39f19a3b3c06824ca3e99e6cfcba2d5d2 | |
parent | b667765b2c3e098c5930c28c2f89584523bf99d6 (diff) | |
download | binutils-0d1f4362682f0c3be74f8d8d8e097e9c4a4d04f2.zip binutils-0d1f4362682f0c3be74f8d8d8e097e9c4a4d04f2.tar.gz binutils-0d1f4362682f0c3be74f8d8d8e097e9c4a4d04f2.tar.bz2 |
RISC-V: Don't show support for 1.9.1 priv spec
The privileged spec 1.9.1 support was removed since binutils 2.43. The
linker only recognizes it and then reports a warning that it may
conflict with other spec versions.
While the support is removed, binutils should still recognize it, but it
shouldn't be exposed to the user in `disassember-options` help.
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
-rw-r--r-- | opcodes/riscv-dis.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c index c341a0f..f862ef2 100644 --- a/opcodes/riscv-dis.c +++ b/opcodes/riscv-dis.c @@ -37,6 +37,9 @@ disassemble_info::fprintf_func which is for unstyled output. */ #define fprintf_func please_use_fprintf_styled_func_instead +/* The earliest privilege spec supported by disassembler. */ +#define PRIV_SPEC_EARLIEST PRIV_SPEC_CLASS_1P10 + struct riscv_private_data { bfd_vma gp; @@ -139,7 +142,7 @@ parse_riscv_dis_option (const char *option, struct disassemble_info *info) const char *name = NULL; RISCV_GET_PRIV_SPEC_CLASS (value, priv_spec); - if (priv_spec == PRIV_SPEC_CLASS_NONE) + if (priv_spec < PRIV_SPEC_EARLIEST) opcodes_error_handler (_("unknown privileged spec set by %s=%s"), option, value); else if (pd->default_priv_spec == PRIV_SPEC_CLASS_NONE) @@ -1608,12 +1611,12 @@ disassembler_options_riscv (void) args = XNEWVEC (disasm_option_arg_t, num_args + 1); args[RISCV_OPTION_ARG_PRIV_SPEC].name = "SPEC"; - priv_spec_count = PRIV_SPEC_CLASS_DRAFT - PRIV_SPEC_CLASS_NONE - 1; + priv_spec_count = PRIV_SPEC_CLASS_DRAFT - PRIV_SPEC_EARLIEST; args[RISCV_OPTION_ARG_PRIV_SPEC].values = XNEWVEC (const char *, priv_spec_count + 1); for (i = 0; i < priv_spec_count; i++) args[RISCV_OPTION_ARG_PRIV_SPEC].values[i] - = riscv_priv_specs[i].name; + = riscv_priv_specs[PRIV_SPEC_EARLIEST - PRIV_SPEC_CLASS_NONE - 1 + i].name; /* The array we return must be NULL terminated. */ args[RISCV_OPTION_ARG_PRIV_SPEC].values[i] = NULL; |