diff options
author | David Faust <david.faust@oracle.com> | 2020-09-17 10:42:57 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-09-17 10:42:57 +0100 |
commit | 538c131ec2d588e685e3eb6c94dbe3be84ef75dd (patch) | |
tree | 50834ac82d2d8f556294130fc022ecf73fb05b88 | |
parent | 2c77a3dc8f1bb66c9c5604c1677fb303944d2b1d (diff) | |
download | binutils-gdb-538c131ec2d588e685e3eb6c94dbe3be84ef75dd.tar.gz |
Use the correct no-op ocode for the BPF assembler.
* config/tc-bpf.h (md_single_noop_insn): Use 'ja 0' for no-op.
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-bpf.h | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ded38623435..ec4bea89dcc 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,6 +1,13 @@ 2020-09-15 Nick Clifton <nickc@redhat.com> Import from mainline: + 2020-09-15 David Faust <david.faust@oracle.com> + + * config/tc-bpf.h (md_single_noop_insn): Use 'ja 0' for no-op. + +2020-09-15 Nick Clifton <nickc@redhat.com> + + Import from mainline: 2020-09-14 Nick Clifton <nickc@redhat.com> * read.c (s_nop): New function. Handles the .nop directive. diff --git a/gas/config/tc-bpf.h b/gas/config/tc-bpf.h index cb02d6c1338..e7e505cfaa5 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" |