* [binutils-gdb] RISC-V: don't recognize bogus relocations
@ 2023-04-25 9:19 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-04-25 9:19 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b33e94cfa4777b68719794ad1c1ef630e3dca3c2
commit b33e94cfa4777b68719794ad1c1ef630e3dca3c2
Author: Jan Beulich <jbeulich@suse.com>
Date: Tue Apr 25 11:17:19 2023 +0200
RISC-V: don't recognize bogus relocations
With my_getSmallExpression() consistently and silently failing on
relocation operators not fitting an insn, it is no longer necessary to
hand it percent_op_itype[] "just in case" (i.e. to avoid errors when a
subsequent parsing attempt for another operand combination might
succeed). This also eliminates the latent problem of percent_op_itype[]
and percent_op_stype[] growing a non-identical set of recognized
relocation operators.
Diff:
---
gas/config/tc-riscv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 6b7112bc7c7..c99bab9b1c4 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -2531,7 +2531,7 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
imm_expr->X_op = O_absent;
*imm_reloc = BFD_RELOC_UNUSED;
- p = percent_op_itype;
+ p = percent_op_null;
for (oparg = insn->args;; ++oparg)
{
@@ -3247,7 +3247,6 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
p = percent_op_rtype;
goto alu_op;
case '0': /* AMO displacement, which must be zero. */
- p = percent_op_null;
load_store:
if (riscv_handle_implicit_zero_offset (imm_expr, asarg))
continue;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-25 9:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 9:19 [binutils-gdb] RISC-V: don't recognize bogus relocations Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).