BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>
Cc: "andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
	Kernel Team <Kernel-team@fb.com>,
	Alexei Starovoitov <ast@kernel.org>
Subject: Re: [PATCH v2 bpf-next] libbpf: support .text sub-calls relocations
Date: Wed, 15 Jan 2020 19:29:57 +0000	[thread overview]
Message-ID: <ea3953ba-6ee2-d565-c8ed-be3e32c9d70f@fb.com> (raw)
In-Reply-To: <20200115190856.2391325-1-andriin@fb.com>



On 1/15/20 11:08 AM, Andrii Nakryiko wrote:
> The LLVM patch https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D72197&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=Pw2Bljqg1D5zPVHNmG5W7MTL_jxP_myfOOC4O-YSp_M&s=SUm2Y_ugh5NW-P8Iek263sULvuebiPSzWwtJ9J1Z330&e=  makes LLVM emit function call
> relocations within the same section. This includes a default .text section,
> which contains any BPF sub-programs. This wasn't the case before and so libbpf
> was able to get a way with slightly simpler handling of subprogram call
> relocations.
> 
> This patch adds support for .text section relocations. It needs to ensure
> correct order of relocations, so does two passes:
> - first, relocate .text instructions, if there are any relocations in it;
> - then process all the other programs and copy over patched .text instructions
> for all sub-program calls.
> 
> v1->v2:
> - break early once .text program is processed.
> 
> Cc: Yonghong Song <yhs@fb.com>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Thanks for the quick fix!
Acked-by: Yonghong Song <yhs@fb.com>

  reply	other threads:[~2020-01-15 19:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 19:08 [PATCH v2 bpf-next] libbpf: support .text sub-calls relocations Andrii Nakryiko
2020-01-15 19:29 ` Yonghong Song [this message]
2020-01-15 20:05 ` Alexei Starovoitov

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=ea3953ba-6ee2-d565-c8ed-be3e32c9d70f@fb.com \
    --to=yhs@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    /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