diff options
| author | Andrii Nakryiko <[email protected]> | 2020-01-15 11:08:56 -0800 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-01-15 11:51:48 -0800 |
| commit | 9173cac3b64e6785dd604f5075e6035b045a0026 (patch) | |
| tree | 69fe32b9d326c5adacc059f02a5f653248407108 /tools/perf/scripts/python | |
| parent | 5640a771d7971412049d1934d2d030edfdd1c28e (diff) | |
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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions