From: Nick Clifton <nickc@redhat.com>
To: David Faust <david.faust@oracle.com>, binutils@sourceware.org
Cc: jose.marchesi@oracle.com
Subject: Re: [PATCH] bpf: fix relocation addend incorrect symbol value
Date: Fri, 12 Jan 2024 12:36:16 +0000 [thread overview]
Message-ID: <de0e3ebb-64c4-4c39-9679-93501c54fd40@redhat.com> (raw)
In-Reply-To: <20240111202005.11209-1-david.faust@oracle.com>
Hi David,
> 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.
Approved - please apply.
Cheers
Nick
prev parent reply other threads:[~2024-01-12 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 20:20 David Faust
2024-01-12 12:36 ` Nick Clifton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de0e3ebb-64c4-4c39-9679-93501c54fd40@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sourceware.org \
--cc=david.faust@oracle.com \
--cc=jose.marchesi@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).