mirror of
https://github.com/dynup/kpatch
synced 2024-12-22 21:22:07 +00:00
kmod/patch: fix patch linking with 4.20
4.20 includes commit 69ea912fda74 "kbuild: remove unneeded link_multi_deps" which changes kbuild so that only '.o' files are given to ld as targets for linking, leaving out our linker script. Even before this commit we were still doing this wrong and were succeeding just because ld is smart enough to detect the script, it even throws a warning: ld: warning: kpatch.lds contains output sections; did you forget -T? The right thing to do is to add the script to ldflags either through kbuilds 'ldflags-y' or by adding it to LDFLAGS/KPATCH_LDFLAGS directly. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
da3eed612d
commit
17a97b48bc
@ -11,6 +11,7 @@ KBUILD_CFLAGS_MODULE += -mcmodel=large
|
||||
endif
|
||||
|
||||
obj-m += $(KPATCH_NAME).o
|
||||
ldflags-y += -T $(src)/kpatch.lds
|
||||
|
||||
$(KPATCH_NAME)-objs += patch-hook.o kpatch.lds output.o
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user