mirror of
https://github.com/dynup/kpatch
synced 2025-03-25 04:16:39 +00:00
kmod/patch: add kpatch.lds as a dependency for $(KPATCH_NAME).o
Starting with v5.10 kbuild no longer builds built-in targets for external modules (including extra-y). Further it wasn't guaranteed that extra-y targets were going to be built before linking. Do a proper thing and add kpatch.lds as a dependency for $(KPATCH_NAME).o. Upstream discussion for reference: https://lore.kernel.org/linux-kbuild/20201103054425.59251-1-chao.wang@ucloud.cn/ Fixes: #1148 Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
158efe3191
commit
04021bbfd5
@ -12,7 +12,7 @@ endif
|
||||
|
||||
obj-m += $(KPATCH_NAME).o
|
||||
ldflags-y += -T $(src)/kpatch.lds
|
||||
extra-y := kpatch.lds
|
||||
targets += kpatch.lds
|
||||
|
||||
$(KPATCH_NAME)-objs += patch-hook.o output.o
|
||||
|
||||
@ -21,6 +21,8 @@ all: $(KPATCH_NAME).ko
|
||||
$(KPATCH_NAME).ko:
|
||||
$(KPATCH_MAKE)
|
||||
|
||||
$(obj)/$(KPATCH_NAME).o: $(src)/kpatch.lds
|
||||
|
||||
patch-hook.o: patch-hook.c kpatch-patch-hook.c livepatch-patch-hook.c
|
||||
$(KPATCH_MAKE) patch-hook.o
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user