diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfxx-riscv.c | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4c6c6941591..3ac27196bdc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2020-12-01 Nelson Chu <nelson.chu@sifive.com> + * elfxx-riscv.c (riscv_parse_subset): ISA string cannot contain + any uppercase letter. + +2020-12-01 Nelson Chu <nelson.chu@sifive.com> + * elfxx-riscv.c: Re-indent codes, unify and improve the error messages and comments. (riscv_parse_prefixed_ext): Stop parsing the prefixed class diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 5ed8aa088a2..69f3a4353b9 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1510,9 +1510,21 @@ bfd_boolean riscv_parse_subset (riscv_parse_subset_t *rps, const char *arch) { - const char *p = arch; + const char *p; size_t i; + for (p = arch; *p != '\0'; p++) + { + if (ISUPPER (*p)) + { + rps->error_handler + (_("-march=%s: ISA string cannot contain uppercase letters"), + arch); + return FALSE; + } + } + + p = arch; if (strncmp (p, "rv32", 4) == 0) { *rps->xlen = 32; |