kbuild: fix section mismatch check for vmlinux
vmlinux does not contain relocation entries which is used by the section mismatch checks. Reported by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Use the individual objects as inputs to overcome this limitation. In modpost check the .o files and skip non-ELF files. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
@@ -63,16 +63,16 @@ quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
|
||||
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
|
||||
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
|
||||
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
|
||||
$(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
|
||||
$(wildcard vmlinux) $(filter-out FORCE,$^)
|
||||
$(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
|
||||
|
||||
PHONY += __modpost
|
||||
__modpost: $(modules:.ko=.o) FORCE
|
||||
$(call cmd,modpost)
|
||||
$(call cmd,modpost) $(wildcard vmlinux) $(filter-out FORCE,$^)
|
||||
|
||||
quiet_cmd_kernel-mod = MODPOST $@
|
||||
cmd_kernel-mod = $(cmd_modpost)
|
||||
cmd_kernel-mod = $(cmd_modpost) $(KBUILD_VMLINUX_OBJS)
|
||||
|
||||
PHONY += vmlinux
|
||||
vmlinux: FORCE
|
||||
$(call cmd,kernel-mod)
|
||||
|
||||
|
Reference in New Issue
Block a user