]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/ChangeLog
bpf: fix bpf expression parsing regression in GAS
authorWill Hawkins <hawkinsw@obs.cr>
Mon, 19 Feb 2024 18:24:19 +0000 (19:24 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Mon, 19 Feb 2024 19:48:17 +0000 (20:48 +0100)
commitecd16ae4e47118f66447641d93a6aa1334e550d4
treef380299e54fdd5305a88aae44fa0efd35b3c62ba
parentb86b514aace19799ea141514e16296fb63a089b3
bpf: fix bpf expression parsing regression in GAS

As a result of a switch instead of an if, as would issue non-specific
error messages when it encountered an operand it could not parse in bpf.
This patch fixes that regression and adds a test to prevent it from
reoccurring.

Tested for bpf-unknown-none on x86_64-redhat-linux.

gas/ChangeLog:

* config/tc-bpf.c (parse_expression): Change switch to if so that error
* condition is handled.
* testsuite/gas/bpf/bpf.exp: Invoke new test.
* testsuite/gas/bpf/indcall-badoperand.d: New test.
* testsuite/gas/bpf/indcall-badoperand.l: New test.
* testsuite/gas/bpf/indcall-badoperand.s: New test.
gas/ChangeLog
gas/config/tc-bpf.c
gas/testsuite/gas/bpf/bpf.exp