diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-01-15 22:08:56 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-01-15 22:51:48 +0300 |
commit | 9173cac3b64e6785dd604f5075e6035b045a0026 (patch) | |
tree | 69fe32b9d326c5adacc059f02a5f653248407108 /README | |
parent | 5640a771d7971412049d1934d2d030edfdd1c28e (diff) | |
download | linux-9173cac3b64e6785dd604f5075e6035b045a0026.tar.xz |
libbpf: Support .text sub-calls relocations
The LLVM patch https://reviews.llvm.org/D72197 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.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115190856.2391325-1-andriin@fb.com
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions