-
由 Andrii Nakryiko 提交于
mainline inclusion from mainline-5.13-rc1 commit 9af44bc5 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9af44bc5d4d70b37c9ada24d8e0367b34b805bd3 ------------------------------------------------- Add btf__add_type() API that performs shallow copy of a given BTF type from the source BTF into the destination BTF. All the information and type IDs are preserved, but all the strings encountered are added into the destination BTF and corresponding offsets are rewritten. BTF type IDs are assumed to be correct or such that will be (somehow) modified afterwards. Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210318194036.3521577-6-andrii@kernel.org (cherry picked from commit 9af44bc5) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
15092b0e