summaryrefslogtreecommitdiff
path: root/bfd/elfxx-riscv.c
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2021-04-13 12:32:16 +0800
committerNelson Chu <nelson.chu@sifive.com>2021-04-13 12:49:51 +0800
commite3839c100fdb15d05e6a2fd44557ffdd6fb921b8 (patch)
tree12276e778432ad0ca3459ec5bc2fe3a59d385113 /bfd/elfxx-riscv.c
parent8d85d1f53f28f5ec020add7326055f73dce6ced0 (diff)
RISC-V: Don't report the mismatched version warning for the implicit extensions.
bfd/ * elfnn-riscv.c (riscv_version_mismatch): Do not report the warning when the version of input or output is RISCV_UNKNOWN_VERSION, since the extension is added implicitly. * elfxx-riscv.c: Updated the obsolete comments. (RISCV_UNKNOWN_VERSION): Moved to elfxx-riscv.h. * elfxx-riscv.h (RISCV_UNKNOWN_VERSION): Added.
Diffstat (limited to 'bfd/elfxx-riscv.c')
-rw-r--r--bfd/elfxx-riscv.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 13719e508b..3b38192575 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1026,8 +1026,6 @@ riscv_elf_add_sub_reloc (bfd *abfd,
return bfd_reloc_ok;
}
-#define RISCV_UNKNOWN_VERSION -1
-
/* Lists of prefixed class extensions that binutils should know about.
Whether or not a particular entry is in these lists will dictate if
gas/ld will accept its presence in the architecture string.
@@ -1588,9 +1586,7 @@ riscv_parse_std_ext (riscv_parse_subset_t *rps,
Arguments:
`rps`: Hooks and status for parsing extensions.
`march`: Full ISA string.
- `p`: Curent parsing position.
- `config`: What class and predicate function to use for the
- extension. */
+ `p`: Curent parsing position. */
static const char *
riscv_parse_prefixed_ext (riscv_parse_subset_t *rps,
@@ -1640,9 +1636,8 @@ riscv_parse_prefixed_ext (riscv_parse_subset_t *rps,
/* Check if the prefix extension is known.
For 'x', anything goes but it cannot simply be 'x'.
- For 's', it must be known from a list and cannot simply be 's'.
- For 'h', it must be known from a list and cannot simply be 'h'.
- For 'z', it must be known from a list and cannot simply be 'z'. */
+ For other prefixed extensions, it must be known from a list
+ and cannot simply be the prefixed name. */
/* Check that the extension name is well-formed. */
if (!riscv_valid_prefixed_ext (subset))