summaryrefslogtreecommitdiff
path: root/scripts/Makefile.modfinal
diff options
context:
space:
mode:
authorAlan Maguire <alan.maguire@oracle.com>2024-06-20 12:17:32 +0300
committerAndrii Nakryiko <andrii@kernel.org>2024-06-22 00:45:07 +0300
commit46fb0b62ea29c0dbcb3e44f1d67aafe79bc6e045 (patch)
treeee099472310e53d874ad531b3747d3ea760a1293 /scripts/Makefile.modfinal
parent8646db238997df36c6ad71a9d7e0b52ceee221b2 (diff)
downloadlinux-46fb0b62ea29c0dbcb3e44f1d67aafe79bc6e045.tar.xz
kbuild,bpf: Add module-specific pahole flags for distilled base BTF
Support creation of module BTF along with distilled base BTF; the latter is stored in a .BTF.base ELF section and supplements split BTF references to base BTF with information about base types, allowing for later relocation of split BTF with a (possibly changed) base. resolve_btfids detects the presence of a .BTF.base section and will use it instead of the base BTF it is passed in BTF id resolution. Modules will be built with a distilled .BTF.base section for external module build, i.e. make -C. -M=path2/module ...while in-tree module build as part of a normal kernel build will not generate distilled base BTF; this is because in-tree modules change with the kernel and do not require BTF relocation for the running vmlinux. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Reviewed-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/bpf/20240620091733.1967885-6-alan.maguire@oracle.com
Diffstat (limited to 'scripts/Makefile.modfinal')
-rw-r--r--scripts/Makefile.modfinal2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
index 3bec9043e4f3..1fa98b5e952b 100644
--- a/scripts/Makefile.modfinal
+++ b/scripts/Makefile.modfinal
@@ -41,7 +41,7 @@ quiet_cmd_btf_ko = BTF [M] $@
if [ ! -f vmlinux ]; then \
printf "Skipping BTF generation for %s due to unavailability of vmlinux\n" $@ 1>&2; \
else \
- LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) --btf_base vmlinux $@; \
+ LLVM_OBJCOPY="$(OBJCOPY)" $(PAHOLE) -J $(PAHOLE_FLAGS) $(MODULE_PAHOLE_FLAGS) --btf_base vmlinux $@; \
$(RESOLVE_BTFIDS) -b vmlinux $@; \
fi;