aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-07-05 16:31:30 +0930
committerAlan Modra <amodra@gmail.com>2021-07-05 21:39:33 +0930
commitb4c4b8aaad84853ddf1b2779a5f1bbe5be157397 (patch)
treee01cce20071d44ecad07c05d72a7ea7597844356 /cpu
parent40e1d303cedca7d67f6219686f06b9750659beab (diff)
downloadfsf-binutils-gdb-b4c4b8aaad84853ddf1b2779a5f1bbe5be157397.zip
fsf-binutils-gdb-b4c4b8aaad84853ddf1b2779a5f1bbe5be157397.tar.gz
fsf-binutils-gdb-b4c4b8aaad84853ddf1b2779a5f1bbe5be157397.tar.bz2
PR28055, segfault in bpf special reloc function
The testcase in this PR tickled two bugs fixed here. output_bfd is NULL when a reloc special_function is called for final linking and when called from bfd_generic_get_relocated_section_contents. Clearly using output_bfd is wrong as it results in segfaults. Not only that, the endianness of the reloc field really should be that of the input. The second bug was not checking that the entire reloc field was contained in the section contents. PR 28055 * elf64-bpf.c (bpf_elf_generic_reloc): Use correct bfd for bfd_put and bfd_put_32 calls. Correct section limit checks.
Diffstat (limited to 'cpu')
0 files changed, 0 insertions, 0 deletions