aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Kbuild21
-rw-r--r--Makefile28
-rw-r--r--arch/arm/boot/Makefile2
-rw-r--r--arch/ia64/kernel/Makefile2
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/um/Makefile6
-rw-r--r--arch/x86/Makefile2
-rw-r--r--arch/x86/Makefile.um2
-rw-r--r--scripts/Makefile.dtbinst2
-rw-r--r--scripts/Makefile.fwinst2
-rw-r--r--scripts/kallsyms.c29
11 files changed, 50 insertions, 48 deletions
diff --git a/Kbuild b/Kbuild
index ab8ded92e870..6f0d82a9245d 100644
--- a/Kbuild
+++ b/Kbuild
@@ -13,8 +13,9 @@ define sed-y
13 s:->::; p;}" 13 s:->::; p;}"
14endef 14endef
15 15
16quiet_cmd_offsets = GEN $@ 16# Use filechk to avoid rebuilds when a header changes, but the resulting file
17define cmd_offsets 17# does not
18define 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" )
30endef 31endef
31 32
32##### 33#####
@@ -35,16 +36,15 @@ endef
35bounds-file := include/generated/bounds.h 36bounds-file := include/generated/bounds.h
36 37
37always := $(bounds-file) 38always := $(bounds-file)
38targets := $(bounds-file) kernel/bounds.s 39targets := 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
41kernel/bounds.s: kernel/bounds.c FORCE 42kernel/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
53offsets-file := include/generated/asm-offsets.h 53offsets-file := include/generated/asm-offsets.h
54 54
55always += $(offsets-file) 55always += $(offsets-file)
56targets += $(offsets-file)
57targets += arch/$(SRCARCH)/kernel/asm-offsets.s 56targets += 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
diff --git a/Makefile b/Makefile
index 9b76ce1e08bb..6cc5b2434224 100644
--- a/Makefile
+++ b/Makefile
@@ -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);
15MAKEFLAGS += -rR 15# o Look for make include files relative to root of kernel src
16MAKEFLAGS += -rR --include-dir=$(CURDIR)
16 17
17# Avoid funny character set dependencies 18# Avoid funny character set dependencies
18unexport LC_ALL 19unexport LC_ALL
@@ -344,12 +345,9 @@ endif
344export COMPILER 345export COMPILER
345endif 346endif
346 347
347# Look for make include files relative to root of kernel src
348MAKEFLAGS += --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: ; 349scripts/Kbuild.include: ;
352include $(srctree)/scripts/Kbuild.include 350include scripts/Kbuild.include
353 351
354# Make variables (CC, etc...) 352# Make variables (CC, etc...)
355AS = $(CROSS_COMPILE)as 353AS = $(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'
536include $(srctree)/arch/$(SRCARCH)/Makefile 534include arch/$(SRCARCH)/Makefile
537export KBUILD_DEFCONFIG KBUILD_KCONFIG 535export KBUILD_DEFCONFIG KBUILD_KCONFIG
538 536
539config: scripts_basic outputmakefile FORCE 537config: 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
610all: vmlinux 608all: vmlinux
611 609
612include $(srctree)/arch/$(SRCARCH)/Makefile 610include arch/$(SRCARCH)/Makefile
613 611
614KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) 612KBUILD_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
783endif 781endif
784 782
785include $(srctree)/scripts/Makefile.kasan 783include scripts/Makefile.kasan
786include $(srctree)/scripts/Makefile.extrawarn 784include 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
789KBUILD_CPPFLAGS += $(KCPPFLAGS) 787KBUILD_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
1031PHONY += depend dep
1032depend dep:
1033 @echo '*** Warning: make $@ is unnecessary now.'
1034
1035# ---------------------------------------------------------------------------
1036# Firmware install 1028# Firmware install
1037INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware 1029INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
1038export INSTALL_FW_PATH 1030export 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
14ifneq ($(MACHINE),) 14ifneq ($(MACHINE),)
15include $(srctree)/$(MACHINE)/Makefile.boot 15include $(MACHINE)/Makefile.boot
16endif 16endif
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
51CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31 51CFLAGS_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.
54include $(srctree)/arch/ia64/kernel/Makefile.gate 54include $(src)/Makefile.gate
55# tell compiled for native 55# tell compiled for native
56CPPFLAGS_gate.lds += -D__IA64_GATE_PARAVIRTUALIZED_NATIVE 56CPPFLAGS_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#
228include $(srctree)/arch/mips/Kbuild.platforms 228include arch/mips/Kbuild.platforms
229 229
230ifdef CONFIG_PHYSICAL_START 230ifdef CONFIG_PHYSICAL_START
231load-y = $(CONFIG_PHYSICAL_START) 231load-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
44HOST_DIR := arch/$(HEADER_ARCH) 44HOST_DIR := arch/$(HEADER_ARCH)
45 45
46include $(srctree)/$(ARCH_DIR)/Makefile-skas 46include $(ARCH_DIR)/Makefile-skas
47include $(srctree)/$(HOST_DIR)/Makefile.um 47include $(HOST_DIR)/Makefile.um
48 48
49core-y += $(HOST_DIR)/um/ 49core-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.
76include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) 76include $(ARCH_DIR)/Makefile-os-$(OS)
77 77
78KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ 78KBUILD_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
18export LDS_EXTRA 18export 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.
21include $(srctree)/arch/x86/Makefile_32.cpu 21include 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.
24cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) 24cflags-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
19include include/config/auto.conf 19include include/config/auto.conf
20include scripts/Kbuild.include 20include scripts/Kbuild.include
21include $(srctree)/$(obj)/Makefile 21include $(src)/Makefile
22 22
23PHONY += __dtbs_install_prep 23PHONY += __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
15include scripts/Kbuild.include 15include scripts/Kbuild.include
16include $(srctree)/$(obj)/Makefile 16include $(src)/Makefile
17 17
18include scripts/Makefile.host 18include 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