diff options
author | David Faust <david.faust@oracle.com> | 2020-09-15 10:33:49 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-09-15 10:33:49 +0100 |
commit | 6db9990640cdf7bc0880149f2707904506518fb8 (patch) | |
tree | 69d57fa90e8c42660fca1bd4f48534435247fb7e /gas/config | |
parent | d2b31b672955162463cd47bdb28baf2687bebe28 (diff) | |
download | gdb-6db9990640cdf7bc0880149f2707904506518fb8.zip gdb-6db9990640cdf7bc0880149f2707904506518fb8.tar.gz gdb-6db9990640cdf7bc0880149f2707904506518fb8.tar.bz2 |
Change the /nop directive for the BPF port of the assembler to use the encoding expected by the kernel.
* config/tc-bpf.h (md_single_noop_insn): Use 'ja 0' for no-op.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-bpf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/config/tc-bpf.h b/gas/config/tc-bpf.h index cb02d6c..e7e505c 100644 --- a/gas/config/tc-bpf.h +++ b/gas/config/tc-bpf.h @@ -48,4 +48,6 @@ /* Values passed to md_apply_fix don't include the symbol value. */ #define MD_APPLY_SYM_VALUE(FIX) 0 -#define md_single_noop_insn "mov %r1,%r1" +/* The Linux kernel verifier expects NOPs to be encoded in this way; + a jump to offset 0 means jump to the next instruction. */ +#define md_single_noop_insn "ja 0" |