diff options
-rw-r--r-- | Kbuild | 21 | ||||
-rw-r--r-- | Makefile | 28 | ||||
-rw-r--r-- | arch/arm/boot/Makefile | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/Makefile | 2 | ||||
-rw-r--r-- | arch/um/Makefile | 6 | ||||
-rw-r--r-- | arch/x86/Makefile | 2 | ||||
-rw-r--r-- | arch/x86/Makefile.um | 2 | ||||
-rw-r--r-- | scripts/Makefile.dtbinst | 2 | ||||
-rw-r--r-- | scripts/Makefile.fwinst | 2 | ||||
-rw-r--r-- | scripts/kallsyms.c | 29 |
11 files changed, 50 insertions, 48 deletions
@@ -13,8 +13,9 @@ define sed-y | |||
13 | s:->::; p;}" | 13 | s:->::; p;}" |
14 | endef | 14 | endef |
15 | 15 | ||
16 | quiet_cmd_offsets = GEN $@ | 16 | # Use filechk to avoid rebuilds when a header changes, but the resulting file |
17 | define cmd_offsets | 17 | # does not |
18 | define filechk_offsets | ||
18 | (set -e; \ | 19 | (set -e; \ |
19 | echo "#ifndef $2"; \ | 20 | echo "#ifndef $2"; \ |
20 | echo "#define $2"; \ | 21 | echo "#define $2"; \ |
@@ -24,9 +25,9 @@ define cmd_offsets | |||
24 | echo " * This file was generated by Kbuild"; \ | 25 | echo " * This file was generated by Kbuild"; \ |
25 | echo " */"; \ | 26 | echo " */"; \ |
26 | echo ""; \ | 27 | echo ""; \ |
27 | sed -ne $(sed-y) $<; \ | 28 | sed -ne $(sed-y); \ |
28 | echo ""; \ | 29 | echo ""; \ |
29 | echo "#endif" ) > $@ | 30 | echo "#endif" ) |
30 | endef | 31 | endef |
31 | 32 | ||
32 | ##### | 33 | ##### |
@@ -35,16 +36,15 @@ endef | |||
35 | bounds-file := include/generated/bounds.h | 36 | bounds-file := include/generated/bounds.h |
36 | 37 | ||
37 | always := $(bounds-file) | 38 | always := $(bounds-file) |
38 | targets := $(bounds-file) kernel/bounds.s | 39 | targets := kernel/bounds.s |
39 | 40 | ||
40 | # We use internal kbuild rules to avoid the "is up to date" message from make | 41 | # We use internal kbuild rules to avoid the "is up to date" message from make |
41 | kernel/bounds.s: kernel/bounds.c FORCE | 42 | kernel/bounds.s: kernel/bounds.c FORCE |
42 | $(Q)mkdir -p $(dir $@) | 43 | $(Q)mkdir -p $(dir $@) |
43 | $(call if_changed_dep,cc_s_c) | 44 | $(call if_changed_dep,cc_s_c) |
44 | 45 | ||
45 | $(obj)/$(bounds-file): kernel/bounds.s Kbuild | 46 | $(obj)/$(bounds-file): kernel/bounds.s FORCE |
46 | $(Q)mkdir -p $(dir $@) | 47 | $(call filechk,offsets,__LINUX_BOUNDS_H__) |
47 | $(call cmd,offsets,__LINUX_BOUNDS_H__) | ||
48 | 48 | ||
49 | ##### | 49 | ##### |
50 | # 2) Generate asm-offsets.h | 50 | # 2) Generate asm-offsets.h |
@@ -53,7 +53,6 @@ $(obj)/$(bounds-file): kernel/bounds.s Kbuild | |||
53 | offsets-file := include/generated/asm-offsets.h | 53 | offsets-file := include/generated/asm-offsets.h |
54 | 54 | ||
55 | always += $(offsets-file) | 55 | always += $(offsets-file) |
56 | targets += $(offsets-file) | ||
57 | targets += arch/$(SRCARCH)/kernel/asm-offsets.s | 56 | targets += arch/$(SRCARCH)/kernel/asm-offsets.s |
58 | 57 | ||
59 | # We use internal kbuild rules to avoid the "is up to date" message from make | 58 | # We use internal kbuild rules to avoid the "is up to date" message from make |
@@ -62,8 +61,8 @@ arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \ | |||
62 | $(Q)mkdir -p $(dir $@) | 61 | $(Q)mkdir -p $(dir $@) |
63 | $(call if_changed_dep,cc_s_c) | 62 | $(call if_changed_dep,cc_s_c) |
64 | 63 | ||
65 | $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s Kbuild | 64 | $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE |
66 | $(call cmd,offsets,__ASM_OFFSETS_H__) | 65 | $(call filechk,offsets,__ASM_OFFSETS_H__) |
67 | 66 | ||
68 | ##### | 67 | ##### |
69 | # 3) Check for missing system calls | 68 | # 3) Check for missing system calls |
@@ -10,9 +10,10 @@ NAME = Hurr durr I'ma sheep | |||
10 | # Comments in this file are targeted only to the developer, do not | 10 | # Comments in this file are targeted only to the developer, do not |
11 | # expect to learn how to build the kernel reading this file. | 11 | # expect to learn how to build the kernel reading this file. |
12 | 12 | ||
13 | # Do not use make's built-in rules and variables | 13 | # o Do not use make's built-in rules and variables |
14 | # (this increases performance and avoids hard-to-debug behaviour); | 14 | # (this increases performance and avoids hard-to-debug behaviour); |
15 | MAKEFLAGS += -rR | 15 | # o Look for make include files relative to root of kernel src |
16 | MAKEFLAGS += -rR --include-dir=$(CURDIR) | ||
16 | 17 | ||
17 | # Avoid funny character set dependencies | 18 | # Avoid funny character set dependencies |
18 | unexport LC_ALL | 19 | unexport LC_ALL |
@@ -344,12 +345,9 @@ endif | |||
344 | export COMPILER | 345 | export COMPILER |
345 | endif | 346 | endif |
346 | 347 | ||
347 | # Look for make include files relative to root of kernel src | ||
348 | MAKEFLAGS += --include-dir=$(srctree) | ||
349 | |||
350 | # We need some generic definitions (do not try to remake the file). | 348 | # We need some generic definitions (do not try to remake the file). |
351 | $(srctree)/scripts/Kbuild.include: ; | 349 | scripts/Kbuild.include: ; |
352 | include $(srctree)/scripts/Kbuild.include | 350 | include scripts/Kbuild.include |
353 | 351 | ||
354 | # Make variables (CC, etc...) | 352 | # Make variables (CC, etc...) |
355 | AS = $(CROSS_COMPILE)as | 353 | AS = $(CROSS_COMPILE)as |
@@ -533,7 +531,7 @@ ifeq ($(config-targets),1) | |||
533 | # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. | 531 | # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. |
534 | # KBUILD_DEFCONFIG may point out an alternative default configuration | 532 | # KBUILD_DEFCONFIG may point out an alternative default configuration |
535 | # used for 'make defconfig' | 533 | # used for 'make defconfig' |
536 | include $(srctree)/arch/$(SRCARCH)/Makefile | 534 | include arch/$(SRCARCH)/Makefile |
537 | export KBUILD_DEFCONFIG KBUILD_KCONFIG | 535 | export KBUILD_DEFCONFIG KBUILD_KCONFIG |
538 | 536 | ||
539 | config: scripts_basic outputmakefile FORCE | 537 | config: scripts_basic outputmakefile FORCE |
@@ -609,7 +607,7 @@ endif # $(dot-config) | |||
609 | # Defaults to vmlinux, but the arch makefile usually adds further targets | 607 | # Defaults to vmlinux, but the arch makefile usually adds further targets |
610 | all: vmlinux | 608 | all: vmlinux |
611 | 609 | ||
612 | include $(srctree)/arch/$(SRCARCH)/Makefile | 610 | include arch/$(SRCARCH)/Makefile |
613 | 611 | ||
614 | KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) | 612 | KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) |
615 | 613 | ||
@@ -782,8 +780,8 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y) | |||
782 | KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO | 780 | KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO |
783 | endif | 781 | endif |
784 | 782 | ||
785 | include $(srctree)/scripts/Makefile.kasan | 783 | include scripts/Makefile.kasan |
786 | include $(srctree)/scripts/Makefile.extrawarn | 784 | include scripts/Makefile.extrawarn |
787 | 785 | ||
788 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments | 786 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
789 | KBUILD_CPPFLAGS += $(KCPPFLAGS) | 787 | KBUILD_CPPFLAGS += $(KCPPFLAGS) |
@@ -1027,12 +1025,6 @@ headerdep: | |||
1027 | $(srctree)/scripts/headerdep.pl -I$(srctree)/include | 1025 | $(srctree)/scripts/headerdep.pl -I$(srctree)/include |
1028 | 1026 | ||
1029 | # --------------------------------------------------------------------------- | 1027 | # --------------------------------------------------------------------------- |
1030 | |||
1031 | PHONY += depend dep | ||
1032 | depend dep: | ||
1033 | @echo '*** Warning: make $@ is unnecessary now.' | ||
1034 | |||
1035 | # --------------------------------------------------------------------------- | ||
1036 | # Firmware install | 1028 | # Firmware install |
1037 | INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware | 1029 | INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware |
1038 | export INSTALL_FW_PATH | 1030 | export INSTALL_FW_PATH |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index ec2f8065f955..9eca7aee927f 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | 13 | ||
14 | ifneq ($(MACHINE),) | 14 | ifneq ($(MACHINE),) |
15 | include $(srctree)/$(MACHINE)/Makefile.boot | 15 | include $(MACHINE)/Makefile.boot |
16 | endif | 16 | endif |
17 | 17 | ||
18 | # Note: the following conditions must always be true: | 18 | # Note: the following conditions must always be true: |
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 20678a9ed11a..d68b5cf81e31 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -51,7 +51,7 @@ obj-$(CONFIG_BINFMT_ELF) += elfcore.o | |||
51 | CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31 | 51 | CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31 |
52 | 52 | ||
53 | # The gate DSO image is built using a special linker script. | 53 | # The gate DSO image is built using a special linker script. |
54 | include $(srctree)/arch/ia64/kernel/Makefile.gate | 54 | include $(src)/Makefile.gate |
55 | # tell compiled for native | 55 | # tell compiled for native |
56 | CPPFLAGS_gate.lds += -D__IA64_GATE_PARAVIRTUALIZED_NATIVE | 56 | CPPFLAGS_gate.lds += -D__IA64_GATE_PARAVIRTUALIZED_NATIVE |
57 | 57 | ||
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 8f57fc72d62c..d152dfbc360d 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -225,7 +225,7 @@ endif | |||
225 | # | 225 | # |
226 | # Board-dependent options and extra files | 226 | # Board-dependent options and extra files |
227 | # | 227 | # |
228 | include $(srctree)/arch/mips/Kbuild.platforms | 228 | include arch/mips/Kbuild.platforms |
229 | 229 | ||
230 | ifdef CONFIG_PHYSICAL_START | 230 | ifdef CONFIG_PHYSICAL_START |
231 | load-y = $(CONFIG_PHYSICAL_START) | 231 | load-y = $(CONFIG_PHYSICAL_START) |
diff --git a/arch/um/Makefile b/arch/um/Makefile index e4b1a9639c4d..17d4460b1af3 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -43,8 +43,8 @@ endif | |||
43 | 43 | ||
44 | HOST_DIR := arch/$(HEADER_ARCH) | 44 | HOST_DIR := arch/$(HEADER_ARCH) |
45 | 45 | ||
46 | include $(srctree)/$(ARCH_DIR)/Makefile-skas | 46 | include $(ARCH_DIR)/Makefile-skas |
47 | include $(srctree)/$(HOST_DIR)/Makefile.um | 47 | include $(HOST_DIR)/Makefile.um |
48 | 48 | ||
49 | core-y += $(HOST_DIR)/um/ | 49 | core-y += $(HOST_DIR)/um/ |
50 | 50 | ||
@@ -73,7 +73,7 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ | |||
73 | $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include | 73 | $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include |
74 | 74 | ||
75 | #This will adjust *FLAGS accordingly to the platform. | 75 | #This will adjust *FLAGS accordingly to the platform. |
76 | include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) | 76 | include $(ARCH_DIR)/Makefile-os-$(OS) |
77 | 77 | ||
78 | KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ | 78 | KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ |
79 | -I$(srctree)/$(HOST_DIR)/include/uapi \ | 79 | -I$(srctree)/$(HOST_DIR)/include/uapi \ |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 5ba2d9ce82dc..2fda005bb334 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -63,7 +63,7 @@ ifeq ($(CONFIG_X86_32),y) | |||
63 | $(call cc-option,-fno-unit-at-a-time)) | 63 | $(call cc-option,-fno-unit-at-a-time)) |
64 | 64 | ||
65 | # CPU-specific tuning. Anything which can be shared with UML should go here. | 65 | # CPU-specific tuning. Anything which can be shared with UML should go here. |
66 | include $(srctree)/arch/x86/Makefile_32.cpu | 66 | include arch/x86/Makefile_32.cpu |
67 | KBUILD_CFLAGS += $(cflags-y) | 67 | KBUILD_CFLAGS += $(cflags-y) |
68 | 68 | ||
69 | # temporary until string.h is fixed | 69 | # temporary until string.h is fixed |
diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um index 95eba554baf9..5b7e898ffd9a 100644 --- a/arch/x86/Makefile.um +++ b/arch/x86/Makefile.um | |||
@@ -18,7 +18,7 @@ LDS_EXTRA := -Ui386 | |||
18 | export LDS_EXTRA | 18 | export LDS_EXTRA |
19 | 19 | ||
20 | # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. | 20 | # First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y. |
21 | include $(srctree)/arch/x86/Makefile_32.cpu | 21 | include arch/x86/Makefile_32.cpu |
22 | 22 | ||
23 | # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. | 23 | # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. |
24 | cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) | 24 | cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) |
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst index 909ed7a2ac61..1c15717e0d56 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst | |||
@@ -18,7 +18,7 @@ export dtbinst-root ?= $(obj) | |||
18 | 18 | ||
19 | include include/config/auto.conf | 19 | include include/config/auto.conf |
20 | include scripts/Kbuild.include | 20 | include scripts/Kbuild.include |
21 | include $(srctree)/$(obj)/Makefile | 21 | include $(src)/Makefile |
22 | 22 | ||
23 | PHONY += __dtbs_install_prep | 23 | PHONY += __dtbs_install_prep |
24 | __dtbs_install_prep: | 24 | __dtbs_install_prep: |
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst index 5b698add4f31..b27290035253 100644 --- a/scripts/Makefile.fwinst +++ b/scripts/Makefile.fwinst | |||
@@ -13,7 +13,7 @@ src := $(obj) | |||
13 | -include $(objtree)/.config | 13 | -include $(objtree)/.config |
14 | 14 | ||
15 | include scripts/Kbuild.include | 15 | include scripts/Kbuild.include |
16 | include $(srctree)/$(obj)/Makefile | 16 | include $(src)/Makefile |
17 | 17 | ||
18 | include scripts/Makefile.host | 18 | include scripts/Makefile.host |
19 | 19 | ||
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index c6d33bd15b04..8fa81e84e295 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -212,15 +212,22 @@ static int symbol_valid(struct sym_entry *s) | |||
212 | "_SDA_BASE_", /* ppc */ | 212 | "_SDA_BASE_", /* ppc */ |
213 | "_SDA2_BASE_", /* ppc */ | 213 | "_SDA2_BASE_", /* ppc */ |
214 | NULL }; | 214 | NULL }; |
215 | |||
216 | static char *special_suffixes[] = { | ||
217 | "_veneer", /* arm */ | ||
218 | NULL }; | ||
219 | |||
215 | int i; | 220 | int i; |
216 | int offset = 1; | 221 | char *sym_name = (char *)s->sym + 1; |
222 | |||
217 | 223 | ||
218 | if (s->addr < kernel_start_addr) | 224 | if (s->addr < kernel_start_addr) |
219 | return 0; | 225 | return 0; |
220 | 226 | ||
221 | /* skip prefix char */ | 227 | /* skip prefix char */ |
222 | if (symbol_prefix_char && *(s->sym + 1) == symbol_prefix_char) | 228 | if (symbol_prefix_char && *sym_name == symbol_prefix_char) |
223 | offset++; | 229 | sym_name++; |
230 | |||
224 | 231 | ||
225 | /* if --all-symbols is not specified, then symbols outside the text | 232 | /* if --all-symbols is not specified, then symbols outside the text |
226 | * and inittext sections are discarded */ | 233 | * and inittext sections are discarded */ |
@@ -235,22 +242,26 @@ static int symbol_valid(struct sym_entry *s) | |||
235 | * rules. | 242 | * rules. |
236 | */ | 243 | */ |
237 | if ((s->addr == text_range_text->end && | 244 | if ((s->addr == text_range_text->end && |
238 | strcmp((char *)s->sym + offset, | 245 | strcmp(sym_name, |
239 | text_range_text->end_sym)) || | 246 | text_range_text->end_sym)) || |
240 | (s->addr == text_range_inittext->end && | 247 | (s->addr == text_range_inittext->end && |
241 | strcmp((char *)s->sym + offset, | 248 | strcmp(sym_name, |
242 | text_range_inittext->end_sym))) | 249 | text_range_inittext->end_sym))) |
243 | return 0; | 250 | return 0; |
244 | } | 251 | } |
245 | 252 | ||
246 | /* Exclude symbols which vary between passes. */ | 253 | /* Exclude symbols which vary between passes. */ |
247 | if (strstr((char *)s->sym + offset, "_compiled.")) | ||
248 | return 0; | ||
249 | |||
250 | for (i = 0; special_symbols[i]; i++) | 254 | for (i = 0; special_symbols[i]; i++) |
251 | if( strcmp((char *)s->sym + offset, special_symbols[i]) == 0 ) | 255 | if (strcmp(sym_name, special_symbols[i]) == 0) |
252 | return 0; | 256 | return 0; |
253 | 257 | ||
258 | for (i = 0; special_suffixes[i]; i++) { | ||
259 | int l = strlen(sym_name) - strlen(special_suffixes[i]); | ||
260 | |||
261 | if (l >= 0 && strcmp(sym_name + l, special_suffixes[i]) == 0) | ||
262 | return 0; | ||
263 | } | ||
264 | |||
254 | return 1; | 265 | return 1; |
255 | } | 266 | } |
256 | 267 | ||