aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2021-05-13 17:36:13 -0700
committerDaniel Borkmann <[email protected]>2021-05-19 00:33:40 +0200
commitb12688267280b223256c8cf912486577d3adce25 (patch)
tree4a403f6872b12f2638eb4deaca367381fa69d495 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent3abea089246f76c1517b054ddb5946f3f1dbd2c0 (diff)
libbpf: Change the order of data and text relocations.
In order to be able to generate loader program in the later patches change the order of data and text relocations. Also improve the test to include data relos. If the kernel supports "FD array" the map_fd relocations can be processed before text relos since generated loader program won't need to manually patch ld_imm64 insns with map_fd. But ksym and kfunc relocations can only be processed after all calls are relocated, since loader program will consist of a sequence of calls to bpf_btf_find_by_name_kind() followed by patching of btf_id and btf_obj_fd into corresponding ld_imm64 insns. The locations of those ld_imm64 insns are specified in relocations. Hence process all data relocations (maps, ksym, kfunc) together after call relos. Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions