aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 21 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index eccb03b88b8d..284d07202b63 100644
--- a/Makefile
+++ b/Makefile
@@ -492,7 +492,7 @@ endif
492include $(srctree)/arch/$(ARCH)/Makefile 492include $(srctree)/arch/$(ARCH)/Makefile
493 493
494ifdef CONFIG_FRAME_POINTER 494ifdef CONFIG_FRAME_POINTER
495CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) 495CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
496else 496else
497CFLAGS += -fomit-frame-pointer 497CFLAGS += -fomit-frame-pointer
498endif 498endif
@@ -618,7 +618,7 @@ quiet_cmd_vmlinux__ ?= LD $@
618 cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \ 618 cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \
619 -T $(vmlinux-lds) $(vmlinux-init) \ 619 -T $(vmlinux-lds) $(vmlinux-init) \
620 --start-group $(vmlinux-main) --end-group \ 620 --start-group $(vmlinux-main) --end-group \
621 $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^) 621 $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o FORCE ,$^)
622 622
623# Generate new vmlinux version 623# Generate new vmlinux version
624quiet_cmd_vmlinux_version = GEN .version 624quiet_cmd_vmlinux_version = GEN .version
@@ -742,15 +742,31 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
742 742
743endif # ifdef CONFIG_KALLSYMS 743endif # ifdef CONFIG_KALLSYMS
744 744
745# Do modpost on a prelinked vmlinux. The finally linked vmlinux has
746# relevant sections renamed as per the linker script.
747quiet_cmd_vmlinux-modpost = LD $@
748 cmd_vmlinux-modpost = $(LD) $(LDFLAGS) -r -o $@ \
749 $(vmlinux-init) --start-group $(vmlinux-main) --end-group \
750 $(filter-out $(vmlinux-init) $(vmlinux-main) $(vmlinux-lds) FORCE ,$^)
751define rule_vmlinux-modpost
752 :
753 +$(call cmd,vmlinux-modpost)
754 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
755 $(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd
756endef
757
745# vmlinux image - including updated kernel symbols 758# vmlinux image - including updated kernel symbols
746vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE 759vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) vmlinux.o FORCE
747ifdef CONFIG_HEADERS_CHECK 760ifdef CONFIG_HEADERS_CHECK
748 $(Q)$(MAKE) -f $(srctree)/Makefile headers_check 761 $(Q)$(MAKE) -f $(srctree)/Makefile headers_check
749endif 762endif
763 $(call vmlinux-modpost)
750 $(call if_changed_rule,vmlinux__) 764 $(call if_changed_rule,vmlinux__)
751 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
752 $(Q)rm -f .old_version 765 $(Q)rm -f .old_version
753 766
767vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
768 $(call if_changed_rule,vmlinux-modpost)
769
754# The actual objects are generated when descending, 770# The actual objects are generated when descending,
755# make sure no implicit rule kicks in 771# make sure no implicit rule kicks in
756$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; 772$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
@@ -1323,7 +1339,7 @@ define xtags
1323 -I __initdata,__exitdata,__acquires,__releases \ 1339 -I __initdata,__exitdata,__acquires,__releases \
1324 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 1340 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
1325 --extra=+f --c-kinds=+px \ 1341 --extra=+f --c-kinds=+px \
1326 --regex-asm='/ENTRY\(([^)]*)\).*/\1/'; \ 1342 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/'; \
1327 $(all-kconfigs) | xargs $1 -a \ 1343 $(all-kconfigs) | xargs $1 -a \
1328 --langdef=kconfig \ 1344 --langdef=kconfig \
1329 --language-force=kconfig \ 1345 --language-force=kconfig \