aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2024-01-10 15:05:36 -0800
committerDavid Faust <david.faust@oracle.com>2024-01-12 08:22:23 -0800
commitba7c1e37cfb498263a4e309700c27696fa5ff1ad (patch)
treecdd71668ca7941a1e1b173a867b09eab02cfd62d /gprof
parent98138c62cd7f721af132f9b24f274332fd8bf079 (diff)
downloadfsf-binutils-gdb-ba7c1e37cfb498263a4e309700c27696fa5ff1ad.zip
fsf-binutils-gdb-ba7c1e37cfb498263a4e309700c27696fa5ff1ad.tar.gz
fsf-binutils-gdb-ba7c1e37cfb498263a4e309700c27696fa5ff1ad.tar.bz2
bpf: fix relocation addend incorrect symbol value
Relocations installed by the BPF ELF backend were sometimes incorrectly adding the symbol value to the relocation entry addend, when the correct relocation value was already stored in the addend. This could lead to a relocation effectively adding the symbol value twice. Fix that by making bpf_elf_generic_reloc () more similar to the flow of bfd_install_relocation in the case where howto->install_addend is set, which is how it ought to behave. bfd/ * bpf-reloc.def (R_BPF_64_ABS32, R_BPF_64_ABS64) (R_BPF_64_NODYLD32): Set partial_inplace to true. * elf64-bpf.c (bpf_elf_generic_reloc): Do not include the value of the symbol when installing relocation. Copy some additional logic from bfd_elf_generic_reloc. gas/ * testsuite/gas/bpf/bpf.exp: Run new test. * testsuite/gas/bpf/elf-relo-1.d: New. * testsuite/gas/bpf/elf-relo-1.s: New.
Diffstat (limited to 'gprof')
0 files changed, 0 insertions, 0 deletions