diff options
author | David Faust <david.faust@oracle.com> | 2020-08-07 20:36:47 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2020-08-07 20:36:47 +0200 |
commit | d844f10ac2735da8e5643236d7007a81098cbc2b (patch) | |
tree | 540b048e134ea051c03c1876ee87340bb1081e0b /ld | |
parent | fe4c3d430b39d4a8760702c4ecc9e4c1803cb077 (diff) | |
download | gdb-d844f10ac2735da8e5643236d7007a81098cbc2b.zip gdb-d844f10ac2735da8e5643236d7007a81098cbc2b.tar.gz gdb-d844f10ac2735da8e5643236d7007a81098cbc2b.tar.bz2 |
bpf: fix false overflow in eBPF ELF backend linker
When performing DISP{16,32} relocations, the eBPF ELF backend linker
needs to convert the relocation from an address into a signed number
of 64-bit words (minus one) to jump.
Because of this unsigned-to-signed conversion, special care needs to
be taken when dividing to ensure the sign bits remain correct.
Otherwise, a false relocation overflow error can be triggered.
bfd/ChangeLog
2020-08-07 David Faust <david.faust@oracle.com>
* elf64-bpf.c (bpf_elf_relocate_section): Ensure signed division for
DISP16 and DISP32 relocations.
ld/ChangeLog
2020-08-07 David Faust <david.faust@oracle.com>
* testsuite/ld-bpf/call-3.s: New file.
* testsuite/ld-bpf/call-3.d: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index d46e976..db019e2 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-08-07 David Faust <david.faust@oracle.com> + + * testsuite/ld-bpf/call-3.s: New file. + * testsuite/ld-bpf/call-3.d: Likewise. + 2020-08-05 David Faust <david.faust@oracle.com> * testsuite/ld-bpf/call-2.s: New file. |