summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 14:28:19 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 14:28:19 -0700
commitefffbeee5bc4168059683714b300d307f5193d69 (patch)
tree7fde51080f4534a86bfa27a430aaf7ef2bb8ef92 /Makefile
parent40b42f1ebf653cd72c32eb1a1a0b9fea2dfbfd7d (diff)
parentb824325443bb010689d22262c6a4e0feb63bad56 (diff)
downloadlinux-efffbeee5bc4168059683714b300d307f5193d69.tar.gz
linux-efffbeee5bc4168059683714b300d307f5193d69.tar.bz2
linux-efffbeee5bc4168059683714b300d307f5193d69.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits) xtensa: use DATA_DATA in xtensa powerpc: add missing DATA_DATA to powerpc cris: use DATA_DATA in cris kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c kbuild: use -fno-optimize-sibling-calls unconditionally kconfig: reset generated values only if Kconfig and .config agree. kbuild: fix the warning when running make tags kconfig: strip 'CONFIG_' automatically in kernel configuration search kbuild: use POSIX BRE in headers install target Whitelist references from __dbe_table to .init modpost white list pattern adjustment kbuild: do section mismatch check on full vmlinux kbuild: whitelist references from variables named _timer to .init.text kbuild: remove hardcoded _logo names from modpost kbuild: remove hardcoded apic_es7000 from modpost kbuild: warn about references from .init.text to .exit.text kbuild: consolidate section checks kbuild: refactor code in modpost to improve maintainability kbuild: ignore section mismatch warnings originating from .note section kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it ...
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
include $(srctree)/arch/$(ARCH)/Makefile
ifdef CONFIG_FRAME_POINTER
-CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
+CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
CFLAGS += -fomit-frame-pointer
endif
@@ -618,7 +618,7 @@ quiet_cmd_vmlinux__ ?= LD $@
cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \
-T $(vmlinux-lds) $(vmlinux-init) \
--start-group $(vmlinux-main) --end-group \
- $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^)
+ $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o FORCE ,$^)
# Generate new vmlinux version
quiet_cmd_vmlinux_version = GEN .version
@@ -742,15 +742,31 @@ debug_kallsyms: .tmp_map$(last_kallsyms)
endif # ifdef CONFIG_KALLSYMS
+# Do modpost on a prelinked vmlinux. The finally linked vmlinux has
+# relevant sections renamed as per the linker script.
+quiet_cmd_vmlinux-modpost = LD $@
+ cmd_vmlinux-modpost = $(LD) $(LDFLAGS) -r -o $@ \
+ $(vmlinux-init) --start-group $(vmlinux-main) --end-group \
+ $(filter-out $(vmlinux-init) $(vmlinux-main) $(vmlinux-lds) FORCE ,$^)
+define rule_vmlinux-modpost
+ :
+ +$(call cmd,vmlinux-modpost)
+ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
+ $(Q)echo 'cmd_$@ := $(cmd_vmlinux-modpost)' > $(dot-target).cmd
+endef
+
# vmlinux image - including updated kernel symbols
-vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
+vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) vmlinux.o FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
+ $(call vmlinux-modpost)
$(call if_changed_rule,vmlinux__)
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost $@
$(Q)rm -f .old_version
+vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
+ $(call if_changed_rule,vmlinux-modpost)
+
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
@@ -1323,7 +1339,7 @@ define xtags
-I __initdata,__exitdata,__acquires,__releases \
-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \
--extra=+f --c-kinds=+px \
- --regex-asm='/ENTRY\(([^)]*)\).*/\1/'; \
+ --regex-asm='/^ENTRY\(([^)]*)\).*/\1/'; \
$(all-kconfigs) | xargs $1 -a \
--langdef=kconfig \
--language-force=kconfig \