aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-riscv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfxx-riscv.c')
-rw-r--r--bfd/elfxx-riscv.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 5ed8aa0..69f3a43 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;