ANDROID: compile / link / clean protected-exports.o

This commit adds the generation of protected exports to Kbuild.

Bug: 393366754
Change-Id: Ib684e2424638614d38ed6b1390f451781935f37a
Signed-off-by: Sid Nayyar <sidnayyar@google.com>
This commit is contained in:
Sid Nayyar
2025-01-30 09:58:52 -08:00
parent 48559833d1
commit c909fab8b3
3 changed files with 11 additions and 1 deletions

View File

@@ -1548,7 +1548,8 @@ CLEAN_FILES += vmlinux.symvers modules-only.symvers \
modules.builtin modules.builtin.modinfo modules.nsdeps \
modules.builtin.ranges vmlinux.o.map \
compile_commands.json rust/test \
rust-project.json .vmlinux.objs .vmlinux.export.c
rust-project.json .vmlinux.objs .vmlinux.export.c \
.vmlinux.protected-exports.c
# Directories & files removed with 'make mrproper'
MRPROPER_FILES += include/config include/generated \

View File

@@ -20,6 +20,12 @@ quiet_cmd_cc_o_c = CC $@
ifdef CONFIG_MODULES
targets += .vmlinux.export.o
vmlinux: .vmlinux.export.o
ifdef CONFIG_MODULE_SIG_PROTECT
targets += .vmlinux.protected-exports.o
vmlinux: .vmlinux.protected-exports.o
endif
endif
ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)

View File

@@ -70,6 +70,9 @@ vmlinux_link()
if is_enabled CONFIG_MODULES; then
objs="${objs} .vmlinux.export.o"
if is_enabled CONFIG_MODULE_SIG_PROTECT; then
objs="${objs} .vmlinux.protected-exports.o"
fi
fi
objs="${objs} init/version-timestamp.o"