diff options
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-bpf.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 14d1079..3ef92ad 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-06-05 Jose E. Marchesi <jose.marchesi@oracle.com> + + * config/tc-bpf.c (md_apply_fix): Avoid GCC 10 warning + stringop-overflow. + 2020-06-05 Nelson Chu <nelson.chu@sifive.com> * config/tc-riscv.c (explicit_csr): New static boolean. diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c index aa48108..026a631 100644 --- a/gas/config/tc-bpf.c +++ b/gas/config/tc-bpf.c @@ -324,8 +324,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) Note that the CALL instruction has only one operand, so this code is executed only once per instruction. */ - where = fixP->fx_frag->fr_literal + fixP->fx_where; - where[1] = target_big_endian ? 0x01 : 0x10; + where = fixP->fx_frag->fr_literal + fixP->fx_where + 1; + where[0] = target_big_endian ? 0x01 : 0x10; /* Fallthrough. */ case BPF_OPERAND_DISP16: /* The PC-relative displacement fields in jump instructions |