Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (30 commits)
Use macros for .data.page_aligned section.
Use macros for .bss.page_aligned section.
Use new __init_task_data macro in arch init_task.c files.
kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts.
arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
kbuild: add static to prototypes
kbuild: fail build if recordmcount.pl fails
kbuild: set -fconserve-stack option for gcc 4.5
kbuild: echo the record_mcount command
gconfig: disable "typeahead find" search in treeviews
kbuild: fix cc1 options check to ensure we do not use -fPIC when compiling
checkincludes.pl: add option to remove duplicates in place
markup_oops: use modinfo to avoid confusion with underscored module names
checkincludes.pl: provide usage helper
checkincludes.pl: close file as soon as we're done with it
ctags: usability fix
kernel hacking: move STRIP_ASM_SYMS from General
gitignore usr/initramfs_data.cpio.bz2 and usr/initramfs_data.cpio.lzma
kbuild: Check if linker supports the -X option
kbuild: introduce ld-option
...

Fix trivial conflict in scripts/basic/fixdep.c

+475 -356
+16
Documentation/kbuild/kbuild.txt
··· 65 INSTALL_PATH specifies where to place the updated kernel and system map 66 images. Default is /boot, but you can set it to other values. 67 68 69 MODLIB 70 --------------------------------------------------
··· 65 INSTALL_PATH specifies where to place the updated kernel and system map 66 images. Default is /boot, but you can set it to other values. 67 68 + INSTALLKERNEL 69 + -------------------------------------------------- 70 + Install script called when using "make install". 71 + The default name is "installkernel". 72 + 73 + The script will be called with the following arguments: 74 + $1 - kernel version 75 + $2 - kernel image file 76 + $3 - kernel map file 77 + $4 - default install path (use root directory if blank) 78 + 79 + The implmentation of "make install" is architecture specific 80 + and it may differ from the above. 81 + 82 + INSTALLKERNEL is provided to enable the possibility to 83 + specify a custom installer when cross compiling a kernel. 84 85 MODLIB 86 --------------------------------------------------
+17 -3
Documentation/kbuild/makefiles.txt
··· 18 --- 3.9 Dependency tracking 19 --- 3.10 Special Rules 20 --- 3.11 $(CC) support functions 21 22 === 4 Host Program support 23 --- 4.1 Simple Host Program ··· 436 The second argument is optional, and if supplied will be used 437 if first argument is not supported. 438 439 - ld-option 440 - ld-option is used to check if $(CC) when used to link object files 441 supports the given option. An optional second option may be 442 specified if first option are not supported. 443 444 Example: 445 #arch/i386/kernel/Makefile 446 - vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv) 447 448 In the above example, vsyscall-flags will be assigned the option 449 -Wl$(comma)--hash-style=sysv if it is supported by $(CC). ··· 570 CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu-) 571 endif 572 endif 573 574 === 4 Host Program support 575
··· 18 --- 3.9 Dependency tracking 19 --- 3.10 Special Rules 20 --- 3.11 $(CC) support functions 21 + --- 3.12 $(LD) support functions 22 23 === 4 Host Program support 24 --- 4.1 Simple Host Program ··· 435 The second argument is optional, and if supplied will be used 436 if first argument is not supported. 437 438 + cc-ldoption 439 + cc-ldoption is used to check if $(CC) when used to link object files 440 supports the given option. An optional second option may be 441 specified if first option are not supported. 442 443 Example: 444 #arch/i386/kernel/Makefile 445 + vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 446 447 In the above example, vsyscall-flags will be assigned the option 448 -Wl$(comma)--hash-style=sysv if it is supported by $(CC). ··· 569 CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu-) 570 endif 571 endif 572 + 573 + --- 3.12 $(LD) support functions 574 + 575 + ld-option 576 + ld-option is used to check if $(LD) supports the supplied option. 577 + ld-option takes two options as arguments. 578 + The second argument is an optional option that can be used if the 579 + first option is not supported by $(LD). 580 + 581 + Example: 582 + #Makefile 583 + LDFLAGS_vmlinux += $(call really-ld-option, -X) 584 + 585 586 === 4 Host Program support 587
+52 -10
Makefile
··· 179 # Alternatively CROSS_COMPILE can be set in the environment. 180 # Default value for CROSS_COMPILE is not to prefix executables 181 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile 182 export KBUILD_BUILDHOST := $(SUBARCH) 183 - ARCH ?= $(SUBARCH) 184 - CROSS_COMPILE ?= 185 186 # Architecture as present in compile.h 187 UTS_MACHINE := $(ARCH) ··· 352 OBJDUMP = $(CROSS_COMPILE)objdump 353 AWK = awk 354 GENKSYMS = scripts/genksyms/genksyms 355 DEPMOD = /sbin/depmod 356 KALLSYMS = scripts/kallsyms 357 PERL = perl ··· 391 392 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION 393 export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC 394 - export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE 395 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 396 397 export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS ··· 482 # used for 'make defconfig' 483 include $(srctree)/arch/$(SRCARCH)/Makefile 484 export KBUILD_DEFCONFIG KBUILD_KCONFIG 485 486 config: scripts_basic outputmakefile FORCE 487 $(Q)mkdir -p include/linux include/config ··· 615 # revert to pre-gcc-4.4 behaviour of .eh_frame 616 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) 617 618 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments 619 # But warn user when we do so 620 warn-assign = \ ··· 638 639 # Use --build-id when available. 640 LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 641 - $(call ld-option, -Wl$(comma)--build-id,)) 642 LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 643 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 644 645 ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 646 - LDFLAGS_vmlinux += -X 647 endif 648 649 # Default kernel image to build when no specific target is given. ··· 1026 1027 # All the preparing.. 1028 prepare: prepare0 1029 - 1030 - # Leave this as default for preprocessing vmlinux.lds.S, which is now 1031 - # done in arch/$(ARCH)/kernel/Makefile 1032 - 1033 - export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) 1034 1035 # The asm symlink changes when $(ARCH) changes. 1036 # Detect this and ask user to run make mrproper
··· 179 # Alternatively CROSS_COMPILE can be set in the environment. 180 # Default value for CROSS_COMPILE is not to prefix executables 181 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile 182 + # 183 + # To force ARCH and CROSS_COMPILE settings include kernel.* files 184 + # in the kernel tree - do not patch this file. 185 export KBUILD_BUILDHOST := $(SUBARCH) 186 + 187 + # Kbuild save the ARCH and CROSS_COMPILE setting in kernel.* files. 188 + # Restore these settings and check that user did not specify 189 + # conflicting values. 190 + 191 + saved_arch := $(shell cat include/generated/kernel.arch 2> /dev/null) 192 + saved_cross := $(shell cat include/generated/kernel.cross 2> /dev/null) 193 + 194 + ifneq ($(CROSS_COMPILE),) 195 + ifneq ($(saved_cross),) 196 + ifneq ($(CROSS_COMPILE),$(saved_cross)) 197 + $(error CROSS_COMPILE changed from \ 198 + "$(saved_cross)" to \ 199 + to "$(CROSS_COMPILE)". \ 200 + Use "make mrproper" to fix it up) 201 + endif 202 + endif 203 + else 204 + CROSS_COMPILE := $(saved_cross) 205 + endif 206 + 207 + ifneq ($(ARCH),) 208 + ifneq ($(saved_arch),) 209 + ifneq ($(saved_arch),$(ARCH)) 210 + $(error ARCH changed from \ 211 + "$(saved_arch)" to "$(ARCH)". \ 212 + Use "make mrproper" to fix it up) 213 + endif 214 + endif 215 + else 216 + ifneq ($(saved_arch),) 217 + ARCH := $(saved_arch) 218 + else 219 + ARCH := $(SUBARCH) 220 + endif 221 + endif 222 223 # Architecture as present in compile.h 224 UTS_MACHINE := $(ARCH) ··· 315 OBJDUMP = $(CROSS_COMPILE)objdump 316 AWK = awk 317 GENKSYMS = scripts/genksyms/genksyms 318 + INSTALLKERNEL := installkernel 319 DEPMOD = /sbin/depmod 320 KALLSYMS = scripts/kallsyms 321 PERL = perl ··· 353 354 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION 355 export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC 356 + export CPP AR NM STRIP OBJCOPY OBJDUMP 357 + export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE 358 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 359 360 export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS ··· 443 # used for 'make defconfig' 444 include $(srctree)/arch/$(SRCARCH)/Makefile 445 export KBUILD_DEFCONFIG KBUILD_KCONFIG 446 + 447 + # save ARCH & CROSS_COMPILE settings 448 + $(shell mkdir -p include/generated && \ 449 + echo $(ARCH) > include/generated/kernel.arch && \ 450 + echo $(CROSS_COMPILE) > include/generated/kernel.cross) 451 452 config: scripts_basic outputmakefile FORCE 453 $(Q)mkdir -p include/linux include/config ··· 571 # revert to pre-gcc-4.4 behaviour of .eh_frame 572 KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) 573 574 + # conserve stack if available 575 + KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) 576 + 577 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments 578 # But warn user when we do so 579 warn-assign = \ ··· 591 592 # Use --build-id when available. 593 LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 594 + $(call cc-ldoption, -Wl$(comma)--build-id,)) 595 LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 596 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 597 598 ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 599 + LDFLAGS_vmlinux += $(call ld-option, -X,) 600 endif 601 602 # Default kernel image to build when no specific target is given. ··· 979 980 # All the preparing.. 981 prepare: prepare0 982 983 # The asm symlink changes when $(ARCH) changes. 984 # Detect this and ask user to run make mrproper
+3 -3
arch/arm/Makefile
··· 14 ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 15 LDFLAGS_vmlinux += --be8 16 endif 17 - CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) 18 OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 19 GZFLAGS :=-9 20 #KBUILD_CFLAGS +=-pipe ··· 279 echo ' (supply initrd image via make variable INITRD=<path>)' 280 echo ' install - Install uncompressed kernel' 281 echo ' zinstall - Install compressed kernel' 282 - echo ' Install using (your) ~/bin/installkernel or' 283 - echo ' (distribution) /sbin/installkernel or' 284 echo ' install to $$(INSTALL_PATH) and run lilo' 285 endef
··· 14 ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 15 LDFLAGS_vmlinux += --be8 16 endif 17 + 18 OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S 19 GZFLAGS :=-9 20 #KBUILD_CFLAGS +=-pipe ··· 279 echo ' (supply initrd image via make variable INITRD=<path>)' 280 echo ' install - Install uncompressed kernel' 281 echo ' zinstall - Install compressed kernel' 282 + echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' 283 + echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 284 echo ' install to $$(INSTALL_PATH) and run lilo' 285 endef
+2 -2
arch/arm/boot/install.sh
··· 21 # 22 23 # User may have a custom install script 24 - if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 25 - if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 26 27 if [ "$(basename $2)" = "zImage" ]; then 28 # Compressed install
··· 21 # 22 23 # User may have a custom install script 24 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 25 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 26 27 if [ "$(basename $2)" = "zImage" ]; then 28 # Compressed install
+2 -1
arch/arm/kernel/Makefile
··· 2 # Makefile for the linux kernel. 3 # 4 5 - AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) 6 7 ifdef CONFIG_DYNAMIC_FTRACE 8 CFLAGS_REMOVE_ftrace.o = -pg
··· 2 # Makefile for the linux kernel. 3 # 4 5 + CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) 6 + AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) 7 8 ifdef CONFIG_DYNAMIC_FTRACE 9 CFLAGS_REMOVE_ftrace.o = -pg
+2 -3
arch/arm/kernel/init_task.c
··· 24 * 25 * The things we do for performance.. 26 */ 27 - union thread_union init_thread_union 28 - __attribute__((__section__(".data.init_task"))) = 29 - { INIT_THREAD_INFO(init_task) }; 30 31 /* 32 * Initial task structure.
··· 24 * 25 * The things we do for performance.. 26 */ 27 + union thread_union init_thread_union __init_task_data = 28 + { INIT_THREAD_INFO(init_task) }; 29 30 /* 31 * Initial task structure.
+2 -3
arch/avr32/kernel/init_task.c
··· 18 /* 19 * Initial thread structure. Must be aligned on an 8192-byte boundary. 20 */ 21 - union thread_union init_thread_union 22 - __attribute__((__section__(".data.init_task"))) = 23 - { INIT_THREAD_INFO(init_task) }; 24 25 /* 26 * Initial task structure.
··· 18 /* 19 * Initial thread structure. Must be aligned on an 8192-byte boundary. 20 */ 21 + union thread_union init_thread_union __init_task_data = 22 + { INIT_THREAD_INFO(init_task) }; 23 24 /* 25 * Initial task structure.
+1 -3
arch/avr32/mm/init.c
··· 24 #include <asm/setup.h> 25 #include <asm/sections.h> 26 27 - #define __page_aligned __attribute__((section(".data.page_aligned"))) 28 - 29 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 30 31 - pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned; 32 33 struct page *empty_zero_page; 34 EXPORT_SYMBOL(empty_zero_page);
··· 24 #include <asm/setup.h> 25 #include <asm/sections.h> 26 27 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 28 29 + pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data; 30 31 struct page *empty_zero_page; 32 EXPORT_SYMBOL(empty_zero_page);
+2 -2
arch/blackfin/Makefile
··· 155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' 156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' 157 echo ' install - Install kernel using' 158 - echo ' (your) ~/bin/$(CROSS_COMPILE)installkernel or' 159 - echo ' (distribution) PATH: $(CROSS_COMPILE)installkernel or' 160 echo ' install to $$(INSTALL_PATH)' 161 endef
··· 155 echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' 156 echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' 157 echo ' install - Install kernel using' 158 + echo ' (your) ~/bin/$(INSTALLKERNEL) or' 159 + echo ' (distribution) PATH: $(INSTALLKERNEL) or' 160 echo ' install to $$(INSTALL_PATH)' 161 endef
+3 -3
arch/blackfin/boot/install.sh
··· 36 37 # User may have a custom install script 38 39 - if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 40 - if which ${CROSS_COMPILE}installkernel >/dev/null 2>&1; then 41 - exec ${CROSS_COMPILE}installkernel "$@" 42 fi 43 44 # Default install - same as make zlilo
··· 36 37 # User may have a custom install script 38 39 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 40 + if which ${INSTALLKERNEL} >/dev/null 2>&1; then 41 + exec ${INSTALLKERNEL} "$@" 42 fi 43 44 # Default install - same as make zlilo
-2
arch/cris/Makefile
··· 42 43 OBJCOPYFLAGS := -O binary -R .note -R .comment -S 44 45 - CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 46 - 47 KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) 48 KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) 49 KBUILD_CPPFLAGS += $(inc)
··· 42 43 OBJCOPYFLAGS := -O binary -R .note -R .comment -S 44 45 KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc) 46 KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc) 47 KBUILD_CPPFLAGS += $(inc)
+1
arch/cris/kernel/Makefile
··· 3 # Makefile for the linux kernel. 4 # 5 6 extra-y := vmlinux.lds 7 8 obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o
··· 3 # Makefile for the linux kernel. 4 # 5 6 + CPPFLAGS_vmlinux.lds := -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE) 7 extra-y := vmlinux.lds 8 9 obj-y := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o
+2 -3
arch/cris/kernel/process.c
··· 45 * way process stacks are handled. This is done by having a special 46 * "init_task" linker map entry.. 47 */ 48 - union thread_union init_thread_union 49 - __attribute__((__section__(".data.init_task"))) = 50 - { INIT_THREAD_INFO(init_task) }; 51 52 /* 53 * Initial task structure.
··· 45 * way process stacks are handled. This is done by having a special 46 * "init_task" linker map entry.. 47 */ 48 + union thread_union init_thread_union __init_task_data = 49 + { INIT_THREAD_INFO(init_task) }; 50 51 /* 52 * Initial task structure.
+2 -3
arch/frv/kernel/init_task.c
··· 19 * way process stacks are handled. This is done by having a special 20 * "init_task" linker map entry.. 21 */ 22 - union thread_union init_thread_union 23 - __attribute__((__section__(".data.init_task"))) = 24 - { INIT_THREAD_INFO(init_task) }; 25 26 /* 27 * Initial task structure.
··· 19 * way process stacks are handled. This is done by having a special 20 * "init_task" linker map entry.. 21 */ 22 + union thread_union init_thread_union __init_task_data = 23 + { INIT_THREAD_INFO(init_task) }; 24 25 /* 26 * Initial task structure.
+2 -3
arch/h8300/kernel/init_task.c
··· 31 * way process stacks are handled. This is done by having a special 32 * "init_task" linker map entry.. 33 */ 34 - union thread_union init_thread_union 35 - __attribute__((__section__(".data.init_task"))) = 36 - { INIT_THREAD_INFO(init_task) }; 37
··· 31 * way process stacks are handled. This is done by having a special 32 * "init_task" linker map entry.. 33 */ 34 + union thread_union init_thread_union __init_task_data = 35 + { INIT_THREAD_INFO(init_task) }; 36
+2 -2
arch/ia64/install.sh
··· 21 22 # User may have a custom install script 23 24 - if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 25 - if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 26 27 # Default install - same as make zlilo 28
··· 21 22 # User may have a custom install script 23 24 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 25 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 26 27 # Default install - same as make zlilo 28
+1 -1
arch/ia64/kernel/Makefile.gate
··· 10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ 11 12 GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ 13 - $(call ld-option, -Wl$(comma)--hash-style=sysv) 14 $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE 15 $(call if_changed,gate) 16
··· 10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ 11 12 GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ 13 + $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 14 $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE 15 $(call if_changed,gate) 16
+2 -1
arch/ia64/kernel/init_task.c
··· 33 struct thread_info thread_info; 34 } s; 35 unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)]; 36 - } init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{ 37 .task = INIT_TASK(init_task_mem.s.task), 38 .thread_info = INIT_THREAD_INFO(init_task_mem.s.task) 39 }};
··· 33 struct thread_info thread_info; 34 } s; 35 unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)]; 36 + } init_task_mem asm ("init_task") __init_task_data = 37 + {{ 38 .task = INIT_TASK(init_task_mem.s.task), 39 .thread_info = INIT_THREAD_INFO(init_task_mem.s.task) 40 }};
+2 -2
arch/m32r/boot/compressed/install.sh
··· 24 25 # User may have a custom install script 26 27 - if [ -x /sbin/installkernel ]; then 28 - exec /sbin/installkernel "$@" 29 fi 30 31 if [ "$2" = "zImage" ]; then
··· 24 25 # User may have a custom install script 26 27 + if [ -x /sbin/${INSTALLKERNEL} ]; then 28 + exec /sbin/${INSTALLKERNEL} "$@" 29 fi 30 31 if [ "$2" = "zImage" ]; then
+2 -3
arch/m32r/kernel/init_task.c
··· 20 * way process stacks are handled. This is done by having a special 21 * "init_task" linker map entry.. 22 */ 23 - union thread_union init_thread_union 24 - __attribute__((__section__(".data.init_task"))) = 25 - { INIT_THREAD_INFO(init_task) }; 26 27 /* 28 * Initial task structure.
··· 20 * way process stacks are handled. This is done by having a special 21 * "init_task" linker map entry.. 22 */ 23 + union thread_union init_thread_union __init_task_data = 24 + { INIT_THREAD_INFO(init_task) }; 25 26 /* 27 * Initial task structure.
+2 -2
arch/m68k/install.sh
··· 33 34 # User may have a custom install script 35 36 - if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 37 - if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 38 39 # Default install - same as make zlilo 40
··· 33 34 # User may have a custom install script 35 36 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 37 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 38 39 # Default install - same as make zlilo 40
+3 -3
arch/m68k/kernel/process.c
··· 42 */ 43 static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 44 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 45 - union thread_union init_thread_union 46 - __attribute__((section(".data.init_task"), aligned(THREAD_SIZE))) 47 - = { INIT_THREAD_INFO(init_task) }; 48 49 /* initial task structure */ 50 struct task_struct init_task = INIT_TASK(init_task);
··· 42 */ 43 static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 44 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 45 + union thread_union init_thread_union __init_task_data 46 + __attribute__((aligned(THREAD_SIZE))) = 47 + { INIT_THREAD_INFO(init_task) }; 48 49 /* initial task structure */ 50 struct task_struct init_task = INIT_TASK(init_task);
+2 -3
arch/m68knommu/kernel/init_task.c
··· 31 * way process stacks are handled. This is done by having a special 32 * "init_task" linker map entry.. 33 */ 34 - union thread_union init_thread_union 35 - __attribute__((__section__(".data.init_task"))) = 36 - { INIT_THREAD_INFO(init_task) }; 37
··· 31 * way process stacks are handled. This is done by having a special 32 * "init_task" linker map entry.. 33 */ 34 + union thread_union init_thread_union __init_task_data = 35 + { INIT_THREAD_INFO(init_task) }; 36
+2 -3
arch/microblaze/kernel/init_task.c
··· 19 static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 20 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 21 22 - union thread_union init_thread_union 23 - __attribute__((__section__(".data.init_task"))) = 24 - { INIT_THREAD_INFO(init_task) }; 25 26 struct task_struct init_task = INIT_TASK(init_task); 27 EXPORT_SYMBOL(init_task);
··· 19 static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 20 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 21 22 + union thread_union init_thread_union __init_task_data = 23 + { INIT_THREAD_INFO(init_task) }; 24 25 struct task_struct init_task = INIT_TASK(init_task); 26 EXPORT_SYMBOL(init_task);
+3 -24
arch/mips/Makefile
··· 627 cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 628 drivers-$(CONFIG_PCI) += arch/mips/pci/ 629 630 - ifdef CONFIG_32BIT 631 - ifdef CONFIG_CPU_LITTLE_ENDIAN 632 - JIFFIES = jiffies_64 633 - else 634 - JIFFIES = jiffies_64 + 4 635 - endif 636 - else 637 - JIFFIES = jiffies_64 638 - endif 639 - 640 # 641 # Automatically detect the build format. By default we choose 642 # the elf format according to the load address. ··· 650 endif 651 652 KBUILD_AFLAGS += $(cflags-y) 653 - KBUILD_CFLAGS += $(cflags-y) \ 654 - -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 655 656 LDFLAGS += -m $(ld-emul) 657 ··· 666 endif 667 668 OBJCOPYFLAGS += --remove-section=.reginfo 669 - 670 - # 671 - # Choosing incompatible machines durings configuration will result in 672 - # error messages during linking. Select a default linkscript if 673 - # none has been choosen above. 674 - # 675 - 676 - CPPFLAGS_vmlinux.lds := \ 677 - $(KBUILD_CFLAGS) \ 678 - -D"LOADADDR=$(load-y)" \ 679 - -D"JIFFIES=$(JIFFIES)" \ 680 - -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)" 681 682 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 683
··· 627 cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 628 drivers-$(CONFIG_PCI) += arch/mips/pci/ 629 630 # 631 # Automatically detect the build format. By default we choose 632 # the elf format according to the load address. ··· 660 endif 661 662 KBUILD_AFLAGS += $(cflags-y) 663 + KBUILD_CFLAGS += $(cflags-y) 664 + KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)" 665 + KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)" 666 667 LDFLAGS += -m $(ld-emul) 668 ··· 675 endif 676 677 OBJCOPYFLAGS += --remove-section=.reginfo 678 679 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o 680
+2 -3
arch/mips/kernel/init_task.c
··· 21 * 22 * The things we do for performance.. 23 */ 24 - union thread_union init_thread_union 25 - __attribute__((__section__(".data.init_task"), 26 - __aligned__(THREAD_SIZE))) = 27 { INIT_THREAD_INFO(init_task) }; 28 29 /*
··· 21 * 22 * The things we do for performance.. 23 */ 24 + union thread_union init_thread_union __init_task_data 25 + __attribute__((__aligned__(THREAD_SIZE))) = 26 { INIT_THREAD_INFO(init_task) }; 27 28 /*
+11 -2
arch/mips/kernel/vmlinux.lds.S
··· 10 text PT_LOAD FLAGS(7); /* RWX */ 11 note PT_NOTE FLAGS(4); /* R__ */ 12 } 13 - jiffies = JIFFIES; 14 15 SECTIONS 16 { ··· 38 /* . = 0xa800000000300000; */ 39 . = 0xffffffff80300000; 40 #endif 41 - . = LOADADDR; 42 /* read-only */ 43 _text = .; /* Text and read-only data */ 44 .text : {
··· 10 text PT_LOAD FLAGS(7); /* RWX */ 11 note PT_NOTE FLAGS(4); /* R__ */ 12 } 13 + 14 + ifdef CONFIG_32BIT 15 + ifdef CONFIG_CPU_LITTLE_ENDIAN 16 + jiffies = jiffies_64; 17 + else 18 + jiffies = jiffies_64 + 4; 19 + endif 20 + else 21 + jiffies = jiffies_64; 22 + endif 23 24 SECTIONS 25 { ··· 29 /* . = 0xa800000000300000; */ 30 . = 0xffffffff80300000; 31 #endif 32 + . = VMLINUX_LOAD_ADDRESS; 33 /* read-only */ 34 _text = .; /* Text and read-only data */ 35 .text : {
+2 -3
arch/mn10300/kernel/init_task.c
··· 27 * way process stacks are handled. This is done by having a special 28 * "init_task" linker map entry.. 29 */ 30 - union thread_union init_thread_union 31 - __attribute__((__section__(".data.init_task"))) = 32 - { INIT_THREAD_INFO(init_task) }; 33 34 /* 35 * Initial task structure.
··· 27 * way process stacks are handled. This is done by having a special 28 * "init_task" linker map entry.. 29 */ 30 + union thread_union init_thread_union __init_task_data = 31 + { INIT_THREAD_INFO(init_task) }; 32 33 /* 34 * Initial task structure.
+2 -2
arch/parisc/Makefile
··· 118 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' 119 @echo ' palo - Bootable image (./lifimage)' 120 @echo ' install - Install kernel using' 121 - @echo ' (your) ~/bin/installkernel or' 122 - @echo ' (distribution) /sbin/installkernel or' 123 @echo ' copy to $$(INSTALL_PATH)' 124 endef 125
··· 118 @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' 119 @echo ' palo - Bootable image (./lifimage)' 120 @echo ' install - Install kernel using' 121 + @echo ' (your) ~/bin/$(INSTALLKERNEL) or' 122 + @echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 123 @echo ' copy to $$(INSTALL_PATH)' 124 endef 125
+2 -2
arch/parisc/install.sh
··· 21 22 # User may have a custom install script 23 24 - if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 25 - if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 26 27 # Default install 28
··· 21 22 # User may have a custom install script 23 24 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 25 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 26 27 # Default install 28
+2 -2
arch/parisc/kernel/init_task.c
··· 43 * way process stacks are handled. This is done by having a special 44 * "init_task" linker map entry.. 45 */ 46 - union thread_union init_thread_union 47 - __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) = 48 { INIT_THREAD_INFO(init_task) }; 49 50 #if PT_NLEVELS == 3
··· 43 * way process stacks are handled. This is done by having a special 44 * "init_task" linker map entry.. 45 */ 46 + union thread_union init_thread_union __init_task_data 47 + __attribute__((aligned(128))) = 48 { INIT_THREAD_INFO(init_task) }; 49 50 #if PT_NLEVELS == 3
+2 -4
arch/powerpc/Makefile
··· 158 # Default to zImage, override when needed 159 all: zImage 160 161 - CPPFLAGS_vmlinux.lds := -Upowerpc 162 - 163 BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% 164 165 PHONY += $(BOOT_TARGETS) ··· 180 @echo ' simpleImage.<dt> - Firmware independent image.' 181 @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' 182 @echo ' install - Install kernel using' 183 - @echo ' (your) ~/bin/installkernel or' 184 - @echo ' (distribution) /sbin/installkernel or' 185 @echo ' install to $$(INSTALL_PATH) and run lilo' 186 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' 187 @echo ''
··· 158 # Default to zImage, override when needed 159 all: zImage 160 161 BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% 162 163 PHONY += $(BOOT_TARGETS) ··· 182 @echo ' simpleImage.<dt> - Firmware independent image.' 183 @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' 184 @echo ' install - Install kernel using' 185 + @echo ' (your) ~/bin/$(INSTALLKERNEL) or' 186 + @echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 187 @echo ' install to $$(INSTALL_PATH) and run lilo' 188 @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' 189 @echo ''
+2 -2
arch/powerpc/boot/install.sh
··· 23 24 # User may have a custom install script 25 26 - if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 27 - if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 28 29 # Default install 30
··· 23 24 # User may have a custom install script 25 26 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 27 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 28 29 # Default install 30
+2 -3
arch/powerpc/kernel/init_task.c
··· 16 * way process stacks are handled. This is done by having a special 17 * "init_task" linker map entry.. 18 */ 19 - union thread_union init_thread_union 20 - __attribute__((__section__(".data.init_task"))) = 21 - { INIT_THREAD_INFO(init_task) }; 22 23 /* 24 * Initial task structure.
··· 16 * way process stacks are handled. This is done by having a special 17 * "init_task" linker map entry.. 18 */ 19 + union thread_union init_thread_union __init_task_data = 20 + { INIT_THREAD_INFO(init_task) }; 21 22 /* 23 * Initial task structure.
+3 -2
arch/powerpc/kernel/machine_kexec_64.c
··· 13 #include <linux/kexec.h> 14 #include <linux/smp.h> 15 #include <linux/thread_info.h> 16 #include <linux/errno.h> 17 18 #include <asm/page.h> ··· 250 * We could use a smaller stack if we don't care about anything using 251 * current, but that audit has not been performed. 252 */ 253 - static union thread_union kexec_stack 254 - __attribute__((__section__(".data.init_task"))) = { }; 255 256 /* Our assembly helper, in kexec_stub.S */ 257 extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
··· 13 #include <linux/kexec.h> 14 #include <linux/smp.h> 15 #include <linux/thread_info.h> 16 + #include <linux/init_task.h> 17 #include <linux/errno.h> 18 19 #include <asm/page.h> ··· 249 * We could use a smaller stack if we don't care about anything using 250 * current, but that audit has not been performed. 251 */ 252 + static union thread_union kexec_stack __init_task_data = 253 + { }; 254 255 /* Our assembly helper, in kexec_stub.S */ 256 extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
+2 -1
arch/powerpc/kernel/vdso.c
··· 1 /* 2 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. 3 * <benh@kernel.crashing.org> ··· 75 static union { 76 struct vdso_data data; 77 u8 page[PAGE_SIZE]; 78 - } vdso_data_store __attribute__((__section__(".data.page_aligned"))); 79 struct vdso_data *vdso_data = &vdso_data_store.data; 80 81 /* Format of the patch table */
··· 1 + 2 /* 3 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp. 4 * <benh@kernel.crashing.org> ··· 74 static union { 75 struct vdso_data data; 76 u8 page[PAGE_SIZE]; 77 + } vdso_data_store __page_aligned_data; 78 struct vdso_data *vdso_data = &vdso_data_store.data; 79 80 /* Format of the patch table */
+1 -1
arch/powerpc/kernel/vdso32/Makefile
··· 16 17 EXTRA_CFLAGS := -shared -fno-common -fno-builtin 18 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 19 - $(call ld-option, -Wl$(comma)--hash-style=sysv) 20 EXTRA_AFLAGS := -D__VDSO32__ -s 21 22 obj-y += vdso32_wrapper.o
··· 16 17 EXTRA_CFLAGS := -shared -fno-common -fno-builtin 18 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 19 + $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 20 EXTRA_AFLAGS := -D__VDSO32__ -s 21 22 obj-y += vdso32_wrapper.o
+2 -1
arch/powerpc/kernel/vdso32/vdso32_wrapper.S
··· 1 #include <linux/init.h> 2 #include <asm/page.h> 3 4 - .section ".data.page_aligned" 5 6 .globl vdso32_start, vdso32_end 7 .balign PAGE_SIZE
··· 1 #include <linux/init.h> 2 + #include <linux/linkage.h> 3 #include <asm/page.h> 4 5 + __PAGE_ALIGNED_DATA 6 7 .globl vdso32_start, vdso32_end 8 .balign PAGE_SIZE
+1 -1
arch/powerpc/kernel/vdso64/Makefile
··· 11 12 EXTRA_CFLAGS := -shared -fno-common -fno-builtin 13 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 14 - $(call ld-option, -Wl$(comma)--hash-style=sysv) 15 EXTRA_AFLAGS := -D__VDSO64__ -s 16 17 obj-y += vdso64_wrapper.o
··· 11 12 EXTRA_CFLAGS := -shared -fno-common -fno-builtin 13 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 14 + $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 15 EXTRA_AFLAGS := -D__VDSO64__ -s 16 17 obj-y += vdso64_wrapper.o
+2 -1
arch/powerpc/kernel/vdso64/vdso64_wrapper.S
··· 1 #include <linux/init.h> 2 #include <asm/page.h> 3 4 - .section ".data.page_aligned" 5 6 .globl vdso64_start, vdso64_end 7 .balign PAGE_SIZE
··· 1 #include <linux/init.h> 2 + #include <linux/linkage.h> 3 #include <asm/page.h> 4 5 + __PAGE_ALIGNED_DATA 6 7 .globl vdso64_start, vdso64_end 8 .balign PAGE_SIZE
+2 -2
arch/s390/boot/install.sh
··· 21 22 # User may have a custom install script 23 24 - if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 25 - if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 26 27 # Default install - same as make zlilo 28
··· 21 22 # User may have a custom install script 23 24 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 25 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 26 27 # Default install - same as make zlilo 28
+2 -3
arch/s390/kernel/init_task.c
··· 25 * way process stacks are handled. This is done by having a special 26 * "init_task" linker map entry.. 27 */ 28 - union thread_union init_thread_union 29 - __attribute__((__section__(".data.init_task"))) = 30 - { INIT_THREAD_INFO(init_task) }; 31 32 /* 33 * Initial task structure.
··· 25 * way process stacks are handled. This is done by having a special 26 * "init_task" linker map entry.. 27 */ 28 + union thread_union init_thread_union __init_task_data = 29 + { INIT_THREAD_INFO(init_task) }; 30 31 /* 32 * Initial task structure.
+1 -1
arch/s390/kernel/vdso.c
··· 75 static union { 76 struct vdso_data data; 77 u8 page[PAGE_SIZE]; 78 - } vdso_data_store __attribute__((__section__(".data.page_aligned"))); 79 struct vdso_data *vdso_data = &vdso_data_store.data; 80 81 /*
··· 75 static union { 76 struct vdso_data data; 77 u8 page[PAGE_SIZE]; 78 + } vdso_data_store __page_aligned_data; 79 struct vdso_data *vdso_data = &vdso_data_store.data; 80 81 /*
+1 -1
arch/s390/kernel/vdso32/Makefile
··· 13 KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS)) 14 KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin 15 KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 16 - $(call ld-option, -Wl$(comma)--hash-style=sysv) 17 18 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31) 19 $(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31)
··· 13 KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS)) 14 KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin 15 KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 16 + $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 17 18 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31) 19 $(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31)
+2 -1
arch/s390/kernel/vdso32/vdso32_wrapper.S
··· 1 #include <linux/init.h> 2 #include <asm/page.h> 3 4 - .section ".data.page_aligned" 5 6 .globl vdso32_start, vdso32_end 7 .balign PAGE_SIZE
··· 1 #include <linux/init.h> 2 + #include <linux/linkage.h> 3 #include <asm/page.h> 4 5 + __PAGE_ALIGNED_DATA 6 7 .globl vdso32_start, vdso32_end 8 .balign PAGE_SIZE
+1 -1
arch/s390/kernel/vdso64/Makefile
··· 13 KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS)) 14 KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin 15 KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 16 - $(call ld-option, -Wl$(comma)--hash-style=sysv) 17 18 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64) 19 $(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64)
··· 13 KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS)) 14 KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin 15 KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 16 + $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 17 18 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64) 19 $(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64)
+2 -1
arch/s390/kernel/vdso64/vdso64_wrapper.S
··· 1 #include <linux/init.h> 2 #include <asm/page.h> 3 4 - .section ".data.page_aligned" 5 6 .globl vdso64_start, vdso64_end 7 .balign PAGE_SIZE
··· 1 #include <linux/init.h> 2 + #include <linux/linkage.h> 3 #include <asm/page.h> 4 5 + __PAGE_ALIGNED_DATA 6 7 .globl vdso64_start, vdso64_end 8 .balign PAGE_SIZE
+2 -3
arch/score/kernel/init_task.c
··· 34 * way process stacks are handled. This is done by having a special 35 * "init_task" linker map entry.. 36 */ 37 - union thread_union init_thread_union 38 - __attribute__((__section__(".data.init_task"), __aligned__(THREAD_SIZE))) = 39 - { INIT_THREAD_INFO(init_task) }; 40 41 /* 42 * Initial task structure.
··· 34 * way process stacks are handled. This is done by having a special 35 * "init_task" linker map entry.. 36 */ 37 + union thread_union init_thread_union __init_task_data = 38 + { INIT_THREAD_INFO(init_task) }; 39 40 /* 41 * Initial task structure.
+2 -2
arch/sh/boot/compressed/install.sh
··· 23 24 # User may have a custom install script 25 26 - if [ -x /sbin/installkernel ]; then 27 - exec /sbin/installkernel "$@" 28 fi 29 30 if [ "$2" = "zImage" ]; then
··· 23 24 # User may have a custom install script 25 26 + if [ -x /sbin/${INSTALLKERNEL} ]; then 27 + exec /sbin/${INSTALLKERNEL} "$@" 28 fi 29 30 if [ "$2" = "zImage" ]; then
+2 -3
arch/sh/kernel/init_task.c
··· 17 * way process stacks are handled. This is done by having a special 18 * "init_task" linker map entry.. 19 */ 20 - union thread_union init_thread_union 21 - __attribute__((__section__(".data.init_task"))) = 22 - { INIT_THREAD_INFO(init_task) }; 23 24 /* 25 * Initial task structure.
··· 17 * way process stacks are handled. This is done by having a special 18 * "init_task" linker map entry.. 19 */ 20 + union thread_union init_thread_union __init_task_data = 21 + { INIT_THREAD_INFO(init_task) }; 22 23 /* 24 * Initial task structure.
+2 -4
arch/sh/kernel/irq.c
··· 165 } 166 167 #ifdef CONFIG_IRQSTACKS 168 - static char softirq_stack[NR_CPUS * THREAD_SIZE] 169 - __attribute__((__section__(".bss.page_aligned"))); 170 171 - static char hardirq_stack[NR_CPUS * THREAD_SIZE] 172 - __attribute__((__section__(".bss.page_aligned"))); 173 174 /* 175 * allocate per-cpu stacks for hardirq and for softirq processing
··· 165 } 166 167 #ifdef CONFIG_IRQSTACKS 168 + static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss; 169 170 + static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss; 171 172 /* 173 * allocate per-cpu stacks for hardirq and for softirq processing
+1 -1
arch/sh/kernel/vsyscall/Makefile
··· 15 export CPPFLAGS_vsyscall.lds += -P -C -Ush 16 17 vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \ 18 - $(call ld-option, -Wl$(comma)--hash-style=sysv) 19 20 SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) 21
··· 15 export CPPFLAGS_vsyscall.lds += -P -C -Ush 16 17 vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \ 18 + $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 19 20 SYSCFLAGS_vsyscall-trapa.so = $(vsyscall-flags) 21
-4
arch/sparc/Makefile
··· 31 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 32 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 33 KBUILD_AFLAGS += -m32 34 - CPPFLAGS_vmlinux.lds += -m32 35 36 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 37 # Since 2.5.40, the first stage is left not btfix-ed. ··· 44 45 CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 46 47 - # Undefine sparc when processing vmlinux.lds - it is used 48 - # And teach CPP we are doing 64 bit builds (for this case) 49 - CPPFLAGS_vmlinux.lds += -m64 -Usparc 50 LDFLAGS := -m elf64_sparc 51 export BITS := 64 52
··· 31 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 32 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 33 KBUILD_AFLAGS += -m32 34 35 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 36 # Since 2.5.40, the first stage is left not btfix-ed. ··· 45 46 CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 47 48 LDFLAGS := -m elf64_sparc 49 export BITS := 64 50
+5 -1
arch/sparc/kernel/Makefile
··· 7 8 extra-y := head_$(BITS).o 9 extra-y += init_task.o 10 - extra-y += vmlinux.lds 11 12 obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o 13 obj-$(CONFIG_SPARC32) += etrap_32.o
··· 7 8 extra-y := head_$(BITS).o 9 extra-y += init_task.o 10 + 11 + # Undefine sparc when processing vmlinux.lds - it is used 12 + # And teach CPP we are doing $(BITS) builds (for this case) 13 + CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS) 14 + extra-y += vmlinux.lds 15 16 obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o 17 obj-$(CONFIG_SPARC32) += etrap_32.o
+2 -3
arch/sparc/kernel/init_task.c
··· 18 * If this is not aligned on a 8k boundry, then you should change code 19 * in etrap.S which assumes it. 20 */ 21 - union thread_union init_thread_union 22 - __attribute__((section (".data.init_task"))) 23 - = { INIT_THREAD_INFO(init_task) };
··· 18 * If this is not aligned on a 8k boundry, then you should change code 19 * in etrap.S which assumes it. 20 */ 21 + union thread_union init_thread_union __init_task_data = 22 + { INIT_THREAD_INFO(init_task) };
+4 -5
arch/um/Makefile
··· 96 $(call cc-option, -fno-stack-protector,) \ 97 $(call cc-option, -fno-stack-protector-all,) 98 99 - CONFIG_KERNEL_STACK_ORDER ?= 2 100 - STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) 101 - 102 - CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ 103 - -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE) 104 105 # The wrappers will select whether using "malloc" or the kernel allocator. 106 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
··· 96 $(call cc-option, -fno-stack-protector,) \ 97 $(call cc-option, -fno-stack-protector-all,) 98 99 + # Options used by linker script 100 + export LDS_START := $(START) 101 + export LDS_ELF_ARCH := $(ELF_ARCH) 102 + export LDS_ELF_FORMAT := $(ELF_FORMAT) 103 104 # The wrappers will select whether using "malloc" or the kernel allocator. 105 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
+3
arch/um/kernel/Makefile
··· 3 # Licensed under the GPL 4 # 5 6 extra-y := vmlinux.lds 7 clean-files := 8
··· 3 # Licensed under the GPL 4 # 5 6 + CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \ 7 + -DELF_ARCH=$(LDS_ELF_ARCH) \ 8 + -DELF_FORMAT=$(LDS_ELF_FORMAT) 9 extra-y := vmlinux.lds 10 clean-files := 11
+2 -3
arch/um/kernel/init_task.c
··· 30 * "init_task" linker map entry.. 31 */ 32 33 - union thread_union init_thread_union 34 - __attribute__((__section__(".data.init_task"))) = 35 - { INIT_THREAD_INFO(init_task) }; 36 37 union thread_union cpu0_irqstack 38 __attribute__((__section__(".data.init_irqstack"))) =
··· 30 * "init_task" linker map entry.. 31 */ 32 33 + union thread_union init_thread_union __init_task_data = 34 + { INIT_THREAD_INFO(init_task) }; 35 36 union thread_union cpu0_irqstack 37 __attribute__((__section__(".data.init_irqstack"))) =
+3
arch/um/kernel/vmlinux.lds.S
··· 1 #ifdef CONFIG_LD_SCRIPT_STATIC 2 #include "uml.lds.S" 3 #else
··· 1 + 2 + KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER); 3 + 4 #ifdef CONFIG_LD_SCRIPT_STATIC 5 #include "uml.lds.S" 6 #else
+2 -2
arch/x86/Makefile
··· 179 define archhelp 180 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 181 echo ' install - Install kernel using' 182 - echo ' (your) ~/bin/installkernel or' 183 - echo ' (distribution) /sbin/installkernel or' 184 echo ' install to $$(INSTALL_PATH) and run lilo' 185 echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 186 echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
··· 179 define archhelp 180 echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' 181 echo ' install - Install kernel using' 182 + echo ' (your) ~/bin/$(INSTALLKERNEL) or' 183 + echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 184 echo ' install to $$(INSTALL_PATH) and run lilo' 185 echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' 186 echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
+2 -2
arch/x86/boot/install.sh
··· 33 34 # User may have a custom install script 35 36 - if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 37 - if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi 38 39 # Default install - same as make zlilo 40
··· 33 34 # User may have a custom install script 35 36 + if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi 37 + if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi 38 39 # Default install - same as make zlilo 40
+3 -1
arch/x86/include/asm/cache.h
··· 1 #ifndef _ASM_X86_CACHE_H 2 #define _ASM_X86_CACHE_H 3 4 /* L1 cache line size */ 5 #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) 6 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) ··· 15 #ifdef CONFIG_SMP 16 #define __cacheline_aligned_in_smp \ 17 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \ 18 - __attribute__((__section__(".data.page_aligned"))) 19 #endif 20 #endif 21
··· 1 #ifndef _ASM_X86_CACHE_H 2 #define _ASM_X86_CACHE_H 3 4 + #include <linux/linkage.h> 5 + 6 /* L1 cache line size */ 7 #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) 8 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) ··· 13 #ifdef CONFIG_SMP 14 #define __cacheline_aligned_in_smp \ 15 __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \ 16 + __page_aligned_data 17 #endif 18 #endif 19
+2 -2
arch/x86/kernel/head_32.S
··· 608 /* 609 * BSS section 610 */ 611 - .section ".bss.page_aligned","wa" 612 .align PAGE_SIZE_asm 613 #ifdef CONFIG_X86_PAE 614 swapper_pg_pmd: ··· 626 * This starts the data section. 627 */ 628 #ifdef CONFIG_X86_PAE 629 - .section ".data.page_aligned","wa" 630 /* Page-aligned for the benefit of paravirt? */ 631 .align PAGE_SIZE_asm 632 ENTRY(swapper_pg_dir)
··· 608 /* 609 * BSS section 610 */ 611 + __PAGE_ALIGNED_BSS 612 .align PAGE_SIZE_asm 613 #ifdef CONFIG_X86_PAE 614 swapper_pg_pmd: ··· 626 * This starts the data section. 627 */ 628 #ifdef CONFIG_X86_PAE 629 + __PAGE_ALIGNED_DATA 630 /* Page-aligned for the benefit of paravirt? */ 631 .align PAGE_SIZE_asm 632 ENTRY(swapper_pg_dir)
+1 -1
arch/x86/kernel/head_64.S
··· 418 ENTRY(idt_table) 419 .skip IDT_ENTRIES * 16 420 421 - .section .bss.page_aligned, "aw", @nobits 422 .align PAGE_SIZE 423 ENTRY(empty_zero_page) 424 .skip PAGE_SIZE
··· 418 ENTRY(idt_table) 419 .skip IDT_ENTRIES * 16 420 421 + __PAGE_ALIGNED_BSS 422 .align PAGE_SIZE 423 ENTRY(empty_zero_page) 424 .skip PAGE_SIZE
+2 -3
arch/x86/kernel/init_task.c
··· 20 * way process stacks are handled. This is done by having a special 21 * "init_task" linker map entry.. 22 */ 23 - union thread_union init_thread_union 24 - __attribute__((__section__(".data.init_task"))) = 25 - { INIT_THREAD_INFO(init_task) }; 26 27 /* 28 * Initial task structure.
··· 20 * way process stacks are handled. This is done by having a special 21 * "init_task" linker map entry.. 22 */ 23 + union thread_union init_thread_union __init_task_data = 24 + { INIT_THREAD_INFO(init_task) }; 25 26 /* 27 * Initial task structure.
+1 -1
arch/x86/vdso/Makefile
··· 122 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) 124 125 - VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv) 126 GCOV_PROFILE := n 127 128 #
··· 122 $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ 123 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) 124 125 + VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 126 GCOV_PROFILE := n 127 128 #
+2 -1
arch/xtensa/kernel/Makefile
··· 27 -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g' 28 29 quiet_cmd__cpp_lds_S = LDS $@ 30 - cmd__cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ $< | sed $(sed-y) >$@ 31 32 $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 33 $(call if_changed_dep,_cpp_lds_S)
··· 27 -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g' 28 29 quiet_cmd__cpp_lds_S = LDS $@ 30 + cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \ 31 + | sed $(sed-y) >$@ 32 33 $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 34 $(call if_changed_dep,_cpp_lds_S)
+1 -1
arch/xtensa/kernel/head.S
··· 235 * BSS section 236 */ 237 238 - .section ".bss.page_aligned", "w" 239 #ifdef CONFIG_MMU 240 ENTRY(swapper_pg_dir) 241 .fill PAGE_SIZE, 1, 0
··· 235 * BSS section 236 */ 237 238 + __PAGE_ALIGNED_BSS 239 #ifdef CONFIG_MMU 240 ENTRY(swapper_pg_dir) 241 .fill PAGE_SIZE, 1, 0
+2 -3
arch/xtensa/kernel/init_task.c
··· 23 24 static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 25 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 26 - union thread_union init_thread_union 27 - __attribute__((__section__(".data.init_task"))) = 28 - { INIT_THREAD_INFO(init_task) }; 29 30 struct task_struct init_task = INIT_TASK(init_task); 31
··· 23 24 static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 25 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 26 + union thread_union init_thread_union __init_task_data = 27 + { INIT_THREAD_INFO(init_task) }; 28 29 struct task_struct init_task = INIT_TASK(init_task); 30
+2
include/linux/linkage.h
··· 57 58 #ifdef __ASSEMBLY__ 59 60 #define ALIGN __ALIGN 61 #define ALIGN_STR __ALIGN_STR 62 ··· 67 ALIGN; \ 68 name: 69 #endif 70 71 #ifndef WEAK 72 #define WEAK(name) \
··· 57 58 #ifdef __ASSEMBLY__ 59 60 + #ifndef LINKER_SCRIPT 61 #define ALIGN __ALIGN 62 #define ALIGN_STR __ALIGN_STR 63 ··· 66 ALIGN; \ 67 name: 68 #endif 69 + #endif /* LINKER_SCRIPT */ 70 71 #ifndef WEAK 72 #define WEAK(name) \
-8
init/Kconfig
··· 1006 SLUB sysfs support. /sys/slab will not exist and there will be 1007 no support for cache validation etc. 1008 1009 - config STRIP_ASM_SYMS 1010 - bool "Strip assembler-generated symbols during link" 1011 - default n 1012 - help 1013 - Strip internal assembler-generated symbols during a link (symbols 1014 - that look like '.Lxxx') so they don't pollute the output of 1015 - get_wchan() and suchlike. 1016 - 1017 config COMPAT_BRK 1018 bool "Disable heap randomization" 1019 default y
··· 1006 SLUB sysfs support. /sys/slab will not exist and there will be 1007 no support for cache validation etc. 1008 1009 config COMPAT_BRK 1010 bool "Disable heap randomization" 1011 default y
+8
lib/Kconfig.debug
··· 50 keys are documented in <file:Documentation/sysrq.txt>. Don't say Y 51 unless you really know what this hack does. 52 53 config UNUSED_SYMBOLS 54 bool "Enable unused/obsolete exported symbols" 55 default y if X86
··· 50 keys are documented in <file:Documentation/sysrq.txt>. Don't say Y 51 unless you really know what this hack does. 52 53 + config STRIP_ASM_SYMS 54 + bool "Strip assembler-generated symbols during link" 55 + default n 56 + help 57 + Strip internal assembler-generated symbols during a link (symbols 58 + that look like '.Lxxx') so they don't pollute the output of 59 + get_wchan() and suchlike. 60 + 61 config UNUSED_SYMBOLS 62 bool "Enable unused/obsolete exported symbols" 63 default y if X86
+12 -6
scripts/Kbuild.include
··· 83 # is automatically cleaned up. 84 try-run = $(shell set -e; \ 85 TMP="$(TMPOUT).$$$$.tmp"; \ 86 if ($(1)) >/dev/null 2>&1; \ 87 then echo "$(2)"; \ 88 else echo "$(3)"; \ 89 fi; \ 90 - rm -f "$$TMP") 91 92 # as-option 93 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) ··· 106 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 107 108 cc-option = $(call try-run,\ 109 - $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) 110 111 # cc-option-yn 112 # Usage: flag := $(call cc-option-yn,-march=winchip-c6) 113 cc-option-yn = $(call try-run,\ 114 - $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) 115 116 # cc-option-align 117 # Prefix align with either -falign or -malign ··· 131 # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 132 cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) 133 134 - # ld-option 135 - # Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) 136 - ld-option = $(call try-run,\ 137 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) 138 139 ###### 140
··· 83 # is automatically cleaned up. 84 try-run = $(shell set -e; \ 85 TMP="$(TMPOUT).$$$$.tmp"; \ 86 + TMPO="$(TMPOUT).$$$$.o"; \ 87 if ($(1)) >/dev/null 2>&1; \ 88 then echo "$(2)"; \ 89 else echo "$(3)"; \ 90 fi; \ 91 + rm -f "$$TMP" "$$TMPO") 92 93 # as-option 94 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) ··· 105 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) 106 107 cc-option = $(call try-run,\ 108 + $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2)) 109 110 # cc-option-yn 111 # Usage: flag := $(call cc-option-yn,-march=winchip-c6) 112 cc-option-yn = $(call try-run,\ 113 + $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n) 114 115 # cc-option-align 116 # Prefix align with either -falign or -malign ··· 130 # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) 131 cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) 132 133 + # cc-ldoption 134 + # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) 135 + cc-ldoption = $(call try-run,\ 136 $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2)) 137 + 138 + # ld-option 139 + # Usage: LDFLAGS += $(call ld-option, -X) 140 + ld-option = $(call try-run,\ 141 + $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) 142 143 ###### 144
+4 -2
scripts/Makefile.build
··· 206 endif 207 208 ifdef CONFIG_FTRACE_MCOUNT_RECORD 209 - cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ 210 "$(if $(CONFIG_64BIT),64,32)" \ 211 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 212 "$(if $(part-of-module),1,0)" "$(@)"; ··· 216 $(call echo-cmd,checksrc) $(cmd_checksrc) \ 217 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ 218 $(cmd_modversions) \ 219 $(cmd_record_mcount) \ 220 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ 221 $(dot-target).tmp; \ ··· 270 # Linker scripts preprocessor (.lds.S -> .lds) 271 # --------------------------------------------------------------------------- 272 quiet_cmd_cpp_lds_S = LDS $@ 273 - cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $< 274 275 $(obj)/%.lds: $(src)/%.lds.S FORCE 276 $(call if_changed_dep,cpp_lds_S)
··· 206 endif 207 208 ifdef CONFIG_FTRACE_MCOUNT_RECORD 209 + cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ 210 "$(if $(CONFIG_64BIT),64,32)" \ 211 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 212 "$(if $(part-of-module),1,0)" "$(@)"; ··· 216 $(call echo-cmd,checksrc) $(cmd_checksrc) \ 217 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ 218 $(cmd_modversions) \ 219 + $(call echo-cmd,record_mcount) \ 220 $(cmd_record_mcount) \ 221 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ 222 $(dot-target).tmp; \ ··· 269 # Linker scripts preprocessor (.lds.S -> .lds) 270 # --------------------------------------------------------------------------- 271 quiet_cmd_cpp_lds_S = LDS $@ 272 + cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \ 273 + -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< 274 275 $(obj)/%.lds: $(src)/%.lds.S FORCE 276 $(call if_changed_dep,cpp_lds_S)
+17 -17
scripts/basic/docproc.c
··· 71 72 static char *srctree, *kernsrctree; 73 74 - void usage (void) 75 { 76 fprintf(stderr, "Usage: docproc {doc|depend} file\n"); 77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); ··· 84 /* 85 * Execute kernel-doc with parameters given in svec 86 */ 87 - void exec_kernel_doc(char **svec) 88 { 89 pid_t pid; 90 int ret; ··· 129 struct symfile symfilelist[MAXFILES]; 130 int symfilecnt = 0; 131 132 - void add_new_symbol(struct symfile *sym, char * symname) 133 { 134 sym->symbollist = 135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); ··· 137 } 138 139 /* Add a filename to the list */ 140 - struct symfile * add_new_file(char * filename) 141 { 142 symfilelist[symfilecnt++].filename = strdup(filename); 143 return &symfilelist[symfilecnt - 1]; 144 } 145 146 /* Check if file already are present in the list */ 147 - struct symfile * filename_exist(char * filename) 148 { 149 int i; 150 for (i=0; i < symfilecnt; i++) ··· 157 * List all files referenced within the template file. 158 * Files are separated by tabs. 159 */ 160 - void adddep(char * file) { printf("\t%s", file); } 161 - void adddep2(char * file, char * line) { line = line; adddep(file); } 162 - void noaction(char * line) { line = line; } 163 - void noaction2(char * file, char * line) { file = file; line = line; } 164 165 /* Echo the line without further action */ 166 - void printline(char * line) { printf("%s", line); } 167 168 /* 169 * Find all symbols in filename that are exported with EXPORT_SYMBOL & 170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). 171 * All symbols located are stored in symfilelist. 172 */ 173 - void find_export_symbols(char * filename) 174 { 175 FILE * fp; 176 struct symfile *sym; ··· 227 * intfunc uses -nofunction 228 * extfunc uses -function 229 */ 230 - void docfunctions(char * filename, char * type) 231 { 232 int i,j; 233 int symcnt = 0; ··· 258 fflush(stdout); 259 free(vec); 260 } 261 - void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } 262 - void extfunc(char * filename) { docfunctions(filename, FUNCTION); } 263 264 /* 265 * Document specific function(s) in a file. 266 * Call kernel-doc with the following parameters: 267 * kernel-doc -docbook -function function1 [-function function2] 268 */ 269 - void singfunc(char * filename, char * line) 270 { 271 char *vec[200]; /* Enough for specific functions */ 272 int i, idx = 0; ··· 297 * Call kernel-doc with the following parameters: 298 * kernel-doc -docbook -function "doc section" filename 299 */ 300 - void docsect(char *filename, char *line) 301 { 302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */ 303 char *s; ··· 324 * 5) Lines containing !P 325 * 6) Default lines - lines not matching the above 326 */ 327 - void parse_file(FILE *infile) 328 { 329 char line[MAXLINESZ]; 330 char * s;
··· 71 72 static char *srctree, *kernsrctree; 73 74 + static void usage (void) 75 { 76 fprintf(stderr, "Usage: docproc {doc|depend} file\n"); 77 fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); ··· 84 /* 85 * Execute kernel-doc with parameters given in svec 86 */ 87 + static void exec_kernel_doc(char **svec) 88 { 89 pid_t pid; 90 int ret; ··· 129 struct symfile symfilelist[MAXFILES]; 130 int symfilecnt = 0; 131 132 + static void add_new_symbol(struct symfile *sym, char * symname) 133 { 134 sym->symbollist = 135 realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *)); ··· 137 } 138 139 /* Add a filename to the list */ 140 + static struct symfile * add_new_file(char * filename) 141 { 142 symfilelist[symfilecnt++].filename = strdup(filename); 143 return &symfilelist[symfilecnt - 1]; 144 } 145 146 /* Check if file already are present in the list */ 147 + static struct symfile * filename_exist(char * filename) 148 { 149 int i; 150 for (i=0; i < symfilecnt; i++) ··· 157 * List all files referenced within the template file. 158 * Files are separated by tabs. 159 */ 160 + static void adddep(char * file) { printf("\t%s", file); } 161 + static void adddep2(char * file, char * line) { line = line; adddep(file); } 162 + static void noaction(char * line) { line = line; } 163 + static void noaction2(char * file, char * line) { file = file; line = line; } 164 165 /* Echo the line without further action */ 166 + static void printline(char * line) { printf("%s", line); } 167 168 /* 169 * Find all symbols in filename that are exported with EXPORT_SYMBOL & 170 * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly). 171 * All symbols located are stored in symfilelist. 172 */ 173 + static void find_export_symbols(char * filename) 174 { 175 FILE * fp; 176 struct symfile *sym; ··· 227 * intfunc uses -nofunction 228 * extfunc uses -function 229 */ 230 + static void docfunctions(char * filename, char * type) 231 { 232 int i,j; 233 int symcnt = 0; ··· 258 fflush(stdout); 259 free(vec); 260 } 261 + static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); } 262 + static void extfunc(char * filename) { docfunctions(filename, FUNCTION); } 263 264 /* 265 * Document specific function(s) in a file. 266 * Call kernel-doc with the following parameters: 267 * kernel-doc -docbook -function function1 [-function function2] 268 */ 269 + static void singfunc(char * filename, char * line) 270 { 271 char *vec[200]; /* Enough for specific functions */ 272 int i, idx = 0; ··· 297 * Call kernel-doc with the following parameters: 298 * kernel-doc -docbook -function "doc section" filename 299 */ 300 + static void docsect(char *filename, char *line) 301 { 302 char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */ 303 char *s; ··· 324 * 5) Lines containing !P 325 * 6) Default lines - lines not matching the above 326 */ 327 + static void parse_file(FILE *infile) 328 { 329 char line[MAXLINESZ]; 330 char * s;
+13 -13
scripts/basic/fixdep.c
··· 124 char *depfile; 125 char *cmdline; 126 127 - void usage(void) 128 { 129 fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n"); 130 exit(1); ··· 133 /* 134 * Print out the commandline prefixed with cmd_<target filename> := 135 */ 136 - void print_cmdline(void) 137 { 138 printf("cmd_%s := %s\n\n", target, cmdline); 139 } ··· 146 * Grow the configuration string to a desired length. 147 * Usually the first growth is plenty. 148 */ 149 - void grow_config(int len) 150 { 151 while (len_config + len > size_config) { 152 if (size_config == 0) ··· 162 /* 163 * Lookup a value in the configuration string. 164 */ 165 - int is_defined_config(const char * name, int len) 166 { 167 const char * pconfig; 168 const char * plast = str_config + len_config - len; ··· 178 /* 179 * Add a new value to the configuration string. 180 */ 181 - void define_config(const char * name, int len) 182 { 183 grow_config(len + 1); 184 ··· 190 /* 191 * Clear the set of configuration strings. 192 */ 193 - void clear_config(void) 194 { 195 len_config = 0; 196 define_config("", 0); ··· 199 /* 200 * Record the use of a CONFIG_* word. 201 */ 202 - void use_config(char *m, int slen) 203 { 204 char s[PATH_MAX]; 205 char *p; ··· 220 printf(" $(wildcard include/config/%s.h) \\\n", s); 221 } 222 223 - void parse_config_file(char *map, size_t len) 224 { 225 int *end = (int *) (map + len); 226 /* start at +1, so that p can never be < map */ ··· 254 } 255 256 /* test is s ends in sub */ 257 - int strrcmp(char *s, char *sub) 258 { 259 int slen = strlen(s); 260 int sublen = strlen(sub); ··· 265 return memcmp(s + slen - sublen, sub, sublen); 266 } 267 268 - void do_config_file(char *filename) 269 { 270 struct stat st; 271 int fd; ··· 296 close(fd); 297 } 298 299 - void parse_dep_file(void *map, size_t len) 300 { 301 char *m = map; 302 char *end = m + len; ··· 336 printf("$(deps_%s):\n", target); 337 } 338 339 - void print_deps(void) 340 { 341 struct stat st; 342 int fd; ··· 368 close(fd); 369 } 370 371 - void traps(void) 372 { 373 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; 374 int *p = (int *)test;
··· 124 char *depfile; 125 char *cmdline; 126 127 + static void usage(void) 128 { 129 fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n"); 130 exit(1); ··· 133 /* 134 * Print out the commandline prefixed with cmd_<target filename> := 135 */ 136 + static void print_cmdline(void) 137 { 138 printf("cmd_%s := %s\n\n", target, cmdline); 139 } ··· 146 * Grow the configuration string to a desired length. 147 * Usually the first growth is plenty. 148 */ 149 + static void grow_config(int len) 150 { 151 while (len_config + len > size_config) { 152 if (size_config == 0) ··· 162 /* 163 * Lookup a value in the configuration string. 164 */ 165 + static int is_defined_config(const char * name, int len) 166 { 167 const char * pconfig; 168 const char * plast = str_config + len_config - len; ··· 178 /* 179 * Add a new value to the configuration string. 180 */ 181 + static void define_config(const char * name, int len) 182 { 183 grow_config(len + 1); 184 ··· 190 /* 191 * Clear the set of configuration strings. 192 */ 193 + static void clear_config(void) 194 { 195 len_config = 0; 196 define_config("", 0); ··· 199 /* 200 * Record the use of a CONFIG_* word. 201 */ 202 + static void use_config(char *m, int slen) 203 { 204 char s[PATH_MAX]; 205 char *p; ··· 220 printf(" $(wildcard include/config/%s.h) \\\n", s); 221 } 222 223 + static void parse_config_file(char *map, size_t len) 224 { 225 int *end = (int *) (map + len); 226 /* start at +1, so that p can never be < map */ ··· 254 } 255 256 /* test is s ends in sub */ 257 + static int strrcmp(char *s, char *sub) 258 { 259 int slen = strlen(s); 260 int sublen = strlen(sub); ··· 265 return memcmp(s + slen - sublen, sub, sublen); 266 } 267 268 + static void do_config_file(char *filename) 269 { 270 struct stat st; 271 int fd; ··· 296 close(fd); 297 } 298 299 + static void parse_dep_file(void *map, size_t len) 300 { 301 char *m = map; 302 char *end = m + len; ··· 336 printf("$(deps_%s):\n", target); 337 } 338 339 + static void print_deps(void) 340 { 341 struct stat st; 342 int fd; ··· 368 close(fd); 369 } 370 371 + static void traps(void) 372 { 373 static char test[] __attribute__((aligned(sizeof(int)))) = "CONF"; 374 int *p = (int *)test;
+2 -2
scripts/basic/hash.c
··· 21 * http://www.cse.yorku.ca/~oz/hash.html 22 */ 23 24 - unsigned int djb2_hash(char *str) 25 { 26 unsigned long hash = 5381; 27 int c; ··· 34 return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1)); 35 } 36 37 - unsigned int r5_hash(char *str) 38 { 39 unsigned long hash = 0; 40 int c;
··· 21 * http://www.cse.yorku.ca/~oz/hash.html 22 */ 23 24 + static unsigned int djb2_hash(char *str) 25 { 26 unsigned long hash = 5381; 27 int c; ··· 34 return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1)); 35 } 36 37 + static unsigned int r5_hash(char *str) 38 { 39 unsigned long hash = 0; 40 int c;
+68 -7
scripts/checkincludes.pl
··· 1 #!/usr/bin/perl 2 # 3 - # checkincludes: Find files included more than once in (other) files. 4 # Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>. 5 6 foreach $file (@ARGV) { 7 open(FILE, $file) or die "Cannot open $file: $!.\n"; 8 9 my %includedfiles = (); 10 11 while (<FILE>) { 12 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) { 13 ++$includedfiles{$1}; 14 } 15 - } 16 - 17 - foreach $filename (keys %includedfiles) { 18 - if ($includedfiles{$filename} > 1) { 19 - print "$file: $filename is included more than once.\n"; 20 - } 21 } 22 23 close(FILE); 24 }
··· 1 #!/usr/bin/perl 2 # 3 + # checkincludes: find/remove files included more than once 4 + # 5 # Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>. 6 + # Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com> 7 + # 8 + # This script checks for duplicate includes. It also has support 9 + # to remove them in place. Note that this will not take into 10 + # consideration macros so you should run this only if you know 11 + # you do have real dups and do not have them under #ifdef's. You 12 + # could also just review the results. 13 + 14 + sub usage { 15 + print "Usage: checkincludes.pl [-r]\n"; 16 + print "By default we just warn of duplicates\n"; 17 + print "To remove duplicated includes in place use -r\n"; 18 + exit 1; 19 + } 20 + 21 + my $remove = 0; 22 + 23 + if ($#ARGV < 0) { 24 + usage(); 25 + } 26 + 27 + if ($#ARGV >= 1) { 28 + if ($ARGV[0] =~ /^-/) { 29 + if ($ARGV[0] eq "-r") { 30 + $remove = 1; 31 + shift; 32 + } else { 33 + usage(); 34 + } 35 + } 36 + } 37 38 foreach $file (@ARGV) { 39 open(FILE, $file) or die "Cannot open $file: $!.\n"; 40 41 my %includedfiles = (); 42 + my @file_lines = (); 43 44 while (<FILE>) { 45 if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) { 46 ++$includedfiles{$1}; 47 } 48 + push(@file_lines, $_); 49 } 50 51 + close(FILE); 52 + 53 + if (!$remove) { 54 + foreach $filename (keys %includedfiles) { 55 + if ($includedfiles{$filename} > 1) { 56 + print "$file: $filename is included more than once.\n"; 57 + } 58 + } 59 + next; 60 + } 61 + 62 + open(FILE,">$file") || die("Cannot write to $file: $!"); 63 + 64 + my $dups = 0; 65 + foreach (@file_lines) { 66 + if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) { 67 + foreach $filename (keys %includedfiles) { 68 + if ($1 eq $filename) { 69 + if ($includedfiles{$filename} > 1) { 70 + $includedfiles{$filename}--; 71 + $dups++; 72 + } else { 73 + print FILE $_; 74 + } 75 + } 76 + } 77 + } else { 78 + print FILE $_; 79 + } 80 + } 81 + if ($dups > 0) { 82 + print "$file: removed $dups duplicate includes\n"; 83 + } 84 close(FILE); 85 }
+12 -12
scripts/kconfig/conf.c
··· 38 static char line[128]; 39 static struct menu *rootEntry; 40 41 - static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n"); 42 - 43 - static const char *get_help(struct menu *menu) 44 { 45 - if (menu_has_help(menu)) 46 - return _(menu_get_help(menu)); 47 - else 48 - return nohelp_text; 49 } 50 51 static void strip(char *str) ··· 121 return 1; 122 } 123 124 - int conf_string(struct menu *menu) 125 { 126 struct symbol *sym = menu->sym; 127 const char *def; ··· 140 case '?': 141 /* print help */ 142 if (line[1] == '\n') { 143 - printf("\n%s\n", get_help(menu)); 144 def = NULL; 145 break; 146 } ··· 220 if (sym_set_tristate_value(sym, newval)) 221 return 0; 222 help: 223 - printf("\n%s\n", get_help(menu)); 224 } 225 } 226 ··· 307 fgets(line, 128, stdin); 308 strip(line); 309 if (line[0] == '?') { 310 - printf("\n%s\n", get_help(menu)); 311 continue; 312 } 313 if (!line[0]) ··· 331 if (!child) 332 continue; 333 if (line[strlen(line) - 1] == '?') { 334 - printf("\n%s\n", get_help(child)); 335 continue; 336 } 337 sym_set_choice_value(sym, child->sym);
··· 38 static char line[128]; 39 static struct menu *rootEntry; 40 41 + static void print_help(struct menu *menu) 42 { 43 + struct gstr help = str_new(); 44 + 45 + menu_get_ext_help(menu, &help); 46 + 47 + printf("\n%s\n", str_get(&help)); 48 + str_free(&help); 49 } 50 51 static void strip(char *str) ··· 121 return 1; 122 } 123 124 + static int conf_string(struct menu *menu) 125 { 126 struct symbol *sym = menu->sym; 127 const char *def; ··· 140 case '?': 141 /* print help */ 142 if (line[1] == '\n') { 143 + print_help(menu); 144 def = NULL; 145 break; 146 } ··· 220 if (sym_set_tristate_value(sym, newval)) 221 return 0; 222 help: 223 + print_help(menu); 224 } 225 } 226 ··· 307 fgets(line, 128, stdin); 308 strip(line); 309 if (line[0] == '?') { 310 + print_help(menu); 311 continue; 312 } 313 if (!line[0]) ··· 331 if (!child) 332 continue; 333 if (line[strlen(line) - 1] == '?') { 334 + print_help(child); 335 continue; 336 } 337 sym_set_choice_value(sym, child->sym);
+1 -1
scripts/kconfig/confdata.c
··· 560 return 0; 561 } 562 563 - int conf_split_config(void) 564 { 565 const char *name; 566 char path[128];
··· 560 return 0; 561 } 562 563 + static int conf_split_config(void) 564 { 565 const char *name; 566 char path[128];
+4 -2
scripts/kconfig/expr.c
··· 348 /* 349 * e1 || e2 -> ? 350 */ 351 - struct expr *expr_join_or(struct expr *e1, struct expr *e2) 352 { 353 struct expr *tmp; 354 struct symbol *sym1, *sym2; ··· 412 return NULL; 413 } 414 415 - struct expr *expr_join_and(struct expr *e1, struct expr *e2) 416 { 417 struct expr *tmp; 418 struct symbol *sym1, *sym2; ··· 1098 static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) 1099 { 1100 str_append((struct gstr*)data, str); 1101 } 1102 1103 void expr_gstr_print(struct expr *e, struct gstr *gs)
··· 348 /* 349 * e1 || e2 -> ? 350 */ 351 + static struct expr *expr_join_or(struct expr *e1, struct expr *e2) 352 { 353 struct expr *tmp; 354 struct symbol *sym1, *sym2; ··· 412 return NULL; 413 } 414 415 + static struct expr *expr_join_and(struct expr *e1, struct expr *e2) 416 { 417 struct expr *tmp; 418 struct symbol *sym1, *sym2; ··· 1098 static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) 1099 { 1100 str_append((struct gstr*)data, str); 1101 + if (sym) 1102 + str_printf((struct gstr*)data, " [=%s]", sym_get_string_value(sym)); 1103 } 1104 1105 void expr_gstr_print(struct expr *e, struct gstr *gs)
+4 -17
scripts/kconfig/gconf.c
··· 456 GtkTextBuffer *buffer; 457 GtkTextIter start, end; 458 const char *prompt = _(menu_get_prompt(menu)); 459 - gchar *name; 460 - const char *help; 461 462 - help = menu_get_help(menu); 463 - 464 - /* Gettextize if the help text not empty */ 465 - if ((help != 0) && (help[0] != 0)) 466 - help = _(help); 467 - 468 - if (menu->sym && menu->sym->name) 469 - name = g_strdup_printf(menu->sym->name); 470 - else 471 - name = g_strdup(""); 472 473 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 474 gtk_text_buffer_get_bounds(buffer, &start, &end); ··· 468 gtk_text_buffer_get_end_iter(buffer, &end); 469 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, 470 NULL); 471 - gtk_text_buffer_insert_at_cursor(buffer, " ", 1); 472 - gtk_text_buffer_get_end_iter(buffer, &end); 473 - gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1, 474 - NULL); 475 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); 476 gtk_text_buffer_get_end_iter(buffer, &end); 477 - gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2, 478 NULL); 479 } 480 481
··· 456 GtkTextBuffer *buffer; 457 GtkTextIter start, end; 458 const char *prompt = _(menu_get_prompt(menu)); 459 + struct gstr help = str_new(); 460 461 + menu_get_ext_help(menu, &help); 462 463 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); 464 gtk_text_buffer_get_bounds(buffer, &start, &end); ··· 478 gtk_text_buffer_get_end_iter(buffer, &end); 479 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, 480 NULL); 481 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); 482 gtk_text_buffer_get_end_iter(buffer, &end); 483 + gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2, 484 NULL); 485 + str_free(&help); 486 } 487 488
+2 -2
scripts/kconfig/gconf.glade
··· 547 <property name="headers_visible">True</property> 548 <property name="rules_hint">False</property> 549 <property name="reorderable">False</property> 550 - <property name="enable_search">True</property> 551 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/> 552 <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/> 553 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/> ··· 582 <property name="headers_visible">True</property> 583 <property name="rules_hint">False</property> 584 <property name="reorderable">False</property> 585 - <property name="enable_search">True</property> 586 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/> 587 <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/> 588 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
··· 547 <property name="headers_visible">True</property> 548 <property name="rules_hint">False</property> 549 <property name="reorderable">False</property> 550 + <property name="enable_search">False</property> 551 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/> 552 <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/> 553 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/> ··· 582 <property name="headers_visible">True</property> 583 <property name="rules_hint">False</property> 584 <property name="reorderable">False</property> 585 + <property name="enable_search">False</property> 586 <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/> 587 <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/> 588 <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
+2 -2
scripts/kconfig/kxgettext.c
··· 166 return rc; 167 } 168 169 - void menu_build_message_list(struct menu *menu) 170 { 171 struct menu *child; 172 ··· 211 "msgstr \"\"\n", self->msg); 212 } 213 214 - void menu__xgettext(void) 215 { 216 struct message *m = message__list; 217
··· 166 return rc; 167 } 168 169 + static void menu_build_message_list(struct menu *menu) 170 { 171 struct menu *child; 172 ··· 211 "msgstr \"\"\n", self->msg); 212 } 213 214 + static void menu__xgettext(void) 215 { 216 struct message *m = message__list; 217
+2
scripts/kconfig/lkc_proto.h
··· 17 P(menu_get_parent_menu,struct menu *,(struct menu *menu)); 18 P(menu_has_help,bool,(struct menu *menu)); 19 P(menu_get_help,const char *,(struct menu *menu)); 20 21 /* symbol.c */ 22 P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
··· 17 P(menu_get_parent_menu,struct menu *,(struct menu *menu)); 18 P(menu_has_help,bool,(struct menu *menu)); 19 P(menu_get_help,const char *,(struct menu *menu)); 20 + P(get_symbol_str,void,(struct gstr *r, struct symbol *sym)); 21 + P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); 22 23 /* symbol.c */ 24 P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
+2 -74
scripts/kconfig/mconf.c
··· 199 setmod_text[] = N_( 200 "This feature depends on another which has been configured as a module.\n" 201 "As a result, this feature will be built as a module."), 202 - nohelp_text[] = N_( 203 - "There is no help available for this kernel option.\n"), 204 load_config_text[] = N_( 205 "Enter the name of the configuration file you wish to load. " 206 "Accept the name shown to restore the configuration you " ··· 281 static void show_textbox(const char *title, const char *text, int r, int c); 282 static void show_helptext(const char *title, const char *text); 283 static void show_help(struct menu *menu); 284 - 285 - static void get_prompt_str(struct gstr *r, struct property *prop) 286 - { 287 - int i, j; 288 - struct menu *submenu[8], *menu; 289 - 290 - str_printf(r, _("Prompt: %s\n"), _(prop->text)); 291 - str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, 292 - prop->menu->lineno); 293 - if (!expr_is_yes(prop->visible.expr)) { 294 - str_append(r, _(" Depends on: ")); 295 - expr_gstr_print(prop->visible.expr, r); 296 - str_append(r, "\n"); 297 - } 298 - menu = prop->menu->parent; 299 - for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) 300 - submenu[i++] = menu; 301 - if (i > 0) { 302 - str_printf(r, _(" Location:\n")); 303 - for (j = 4; --i >= 0; j += 2) { 304 - menu = submenu[i]; 305 - str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); 306 - if (menu->sym) { 307 - str_printf(r, " (%s [=%s])", menu->sym->name ? 308 - menu->sym->name : _("<choice>"), 309 - sym_get_string_value(menu->sym)); 310 - } 311 - str_append(r, "\n"); 312 - } 313 - } 314 - } 315 - 316 - static void get_symbol_str(struct gstr *r, struct symbol *sym) 317 - { 318 - bool hit; 319 - struct property *prop; 320 - 321 - if (sym && sym->name) 322 - str_printf(r, "Symbol: %s [=%s]\n", sym->name, 323 - sym_get_string_value(sym)); 324 - for_all_prompts(sym, prop) 325 - get_prompt_str(r, prop); 326 - hit = false; 327 - for_all_properties(sym, prop, P_SELECT) { 328 - if (!hit) { 329 - str_append(r, " Selects: "); 330 - hit = true; 331 - } else 332 - str_printf(r, " && "); 333 - expr_gstr_print(prop->expr, r); 334 - } 335 - if (hit) 336 - str_append(r, "\n"); 337 - if (sym->rev_dep.expr) { 338 - str_append(r, _(" Selected by: ")); 339 - expr_gstr_print(sym->rev_dep.expr, r); 340 - str_append(r, "\n"); 341 - } 342 - str_append(r, "\n\n"); 343 - } 344 345 static struct gstr get_relations_str(struct symbol **sym_arr) 346 { ··· 637 static void show_help(struct menu *menu) 638 { 639 struct gstr help = str_new(); 640 - struct symbol *sym = menu->sym; 641 642 - if (menu_has_help(menu)) 643 - { 644 - if (sym->name) { 645 - str_printf(&help, "CONFIG_%s:\n\n", sym->name); 646 - str_append(&help, _(menu_get_help(menu))); 647 - str_append(&help, "\n"); 648 - } 649 - } else { 650 - str_append(&help, nohelp_text); 651 - } 652 - get_symbol_str(&help, sym); 653 show_helptext(_(menu_get_prompt(menu)), str_get(&help)); 654 str_free(&help); 655 }
··· 199 setmod_text[] = N_( 200 "This feature depends on another which has been configured as a module.\n" 201 "As a result, this feature will be built as a module."), 202 load_config_text[] = N_( 203 "Enter the name of the configuration file you wish to load. " 204 "Accept the name shown to restore the configuration you " ··· 283 static void show_textbox(const char *title, const char *text, int r, int c); 284 static void show_helptext(const char *title, const char *text); 285 static void show_help(struct menu *menu); 286 287 static struct gstr get_relations_str(struct symbol **sym_arr) 288 { ··· 699 static void show_help(struct menu *menu) 700 { 701 struct gstr help = str_new(); 702 703 + menu_get_ext_help(menu, &help); 704 + 705 show_helptext(_(menu_get_prompt(menu)), str_get(&help)); 706 str_free(&help); 707 }
+82 -2
scripts/kconfig/menu.c
··· 9 #define LKC_DIRECT_LINK 10 #include "lkc.h" 11 12 struct menu rootmenu; 13 static struct menu **last_entry_ptr; 14 ··· 77 current_menu = current_menu->parent; 78 } 79 80 - struct expr *menu_check_dep(struct expr *e) 81 { 82 if (!e) 83 return e; ··· 187 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); 188 } 189 190 - void sym_check_prop(struct symbol *sym) 191 { 192 struct property *prop; 193 struct symbol *sym2; ··· 453 return menu->help; 454 else 455 return ""; 456 }
··· 9 #define LKC_DIRECT_LINK 10 #include "lkc.h" 11 12 + static const char nohelp_text[] = N_( 13 + "There is no help available for this kernel option.\n"); 14 + 15 struct menu rootmenu; 16 static struct menu **last_entry_ptr; 17 ··· 74 current_menu = current_menu->parent; 75 } 76 77 + static struct expr *menu_check_dep(struct expr *e) 78 { 79 if (!e) 80 return e; ··· 184 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); 185 } 186 187 + static void sym_check_prop(struct symbol *sym) 188 { 189 struct property *prop; 190 struct symbol *sym2; ··· 450 return menu->help; 451 else 452 return ""; 453 + } 454 + 455 + static void get_prompt_str(struct gstr *r, struct property *prop) 456 + { 457 + int i, j; 458 + struct menu *submenu[8], *menu; 459 + 460 + str_printf(r, _("Prompt: %s\n"), _(prop->text)); 461 + str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, 462 + prop->menu->lineno); 463 + if (!expr_is_yes(prop->visible.expr)) { 464 + str_append(r, _(" Depends on: ")); 465 + expr_gstr_print(prop->visible.expr, r); 466 + str_append(r, "\n"); 467 + } 468 + menu = prop->menu->parent; 469 + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) 470 + submenu[i++] = menu; 471 + if (i > 0) { 472 + str_printf(r, _(" Location:\n")); 473 + for (j = 4; --i >= 0; j += 2) { 474 + menu = submenu[i]; 475 + str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); 476 + if (menu->sym) { 477 + str_printf(r, " (%s [=%s])", menu->sym->name ? 478 + menu->sym->name : _("<choice>"), 479 + sym_get_string_value(menu->sym)); 480 + } 481 + str_append(r, "\n"); 482 + } 483 + } 484 + } 485 + 486 + void get_symbol_str(struct gstr *r, struct symbol *sym) 487 + { 488 + bool hit; 489 + struct property *prop; 490 + 491 + if (sym && sym->name) 492 + str_printf(r, "Symbol: %s [=%s]\n", sym->name, 493 + sym_get_string_value(sym)); 494 + for_all_prompts(sym, prop) 495 + get_prompt_str(r, prop); 496 + hit = false; 497 + for_all_properties(sym, prop, P_SELECT) { 498 + if (!hit) { 499 + str_append(r, " Selects: "); 500 + hit = true; 501 + } else 502 + str_printf(r, " && "); 503 + expr_gstr_print(prop->expr, r); 504 + } 505 + if (hit) 506 + str_append(r, "\n"); 507 + if (sym->rev_dep.expr) { 508 + str_append(r, _(" Selected by: ")); 509 + expr_gstr_print(sym->rev_dep.expr, r); 510 + str_append(r, "\n"); 511 + } 512 + str_append(r, "\n\n"); 513 + } 514 + 515 + void menu_get_ext_help(struct menu *menu, struct gstr *help) 516 + { 517 + struct symbol *sym = menu->sym; 518 + 519 + if (menu_has_help(menu)) { 520 + if (sym->name) { 521 + str_printf(help, "CONFIG_%s:\n\n", sym->name); 522 + str_append(help, _(menu_get_help(menu))); 523 + str_append(help, "\n"); 524 + } 525 + } else { 526 + str_append(help, nohelp_text); 527 + } 528 + if (sym) 529 + get_symbol_str(help, sym); 530 }
+4 -6
scripts/kconfig/qconf.cc
··· 1042 if (showDebug()) 1043 debug = debug_info(sym); 1044 1045 - help = menu_get_help(menu); 1046 - /* Gettextize if the help text not empty */ 1047 - if (help.isEmpty()) 1048 - help = print_filter(menu_get_help(menu)); 1049 - else 1050 - help = print_filter(_(menu_get_help(menu))); 1051 } else if (menu->prompt) { 1052 head += "<big><b>"; 1053 head += print_filter(_(menu->prompt->text));
··· 1042 if (showDebug()) 1043 debug = debug_info(sym); 1044 1045 + struct gstr help_gstr = str_new(); 1046 + menu_get_ext_help(menu, &help_gstr); 1047 + help = print_filter(str_get(&help_gstr)); 1048 + str_free(&help_gstr); 1049 } else if (menu->prompt) { 1050 head += "<big><b>"; 1051 head += print_filter(_(menu->prompt->text));
+3 -3
scripts/kconfig/symbol.c
··· 36 37 struct expr *sym_env_list; 38 39 - void sym_add_default(struct symbol *sym, const char *def) 40 { 41 struct property *prop = prop_alloc(P_DEFAULT, sym); 42 ··· 125 return NULL; 126 } 127 128 - struct property *sym_get_range_prop(struct symbol *sym) 129 { 130 struct property *prop; 131 ··· 943 return "unknown"; 944 } 945 946 - void prop_add_env(const char *env) 947 { 948 struct symbol *sym, *sym2; 949 struct property *prop;
··· 36 37 struct expr *sym_env_list; 38 39 + static void sym_add_default(struct symbol *sym, const char *def) 40 { 41 struct property *prop = prop_alloc(P_DEFAULT, sym); 42 ··· 125 return NULL; 126 } 127 128 + static struct property *sym_get_range_prop(struct symbol *sym) 129 { 130 struct property *prop; 131 ··· 943 return "unknown"; 944 } 945 946 + static void prop_add_env(const char *env) 947 { 948 struct symbol *sym, *sym2; 949 struct property *prop;
+1 -4
scripts/markup_oops.pl
··· 184 185 # if it's a module, we need to find the .ko file and calculate a load offset 186 if ($module ne "") { 187 - my $dir = dirname($filename); 188 - $dir = $dir . "/"; 189 - my $mod = $module . ".ko"; 190 - my $modulefile = `find $dir -name $mod | head -1`; 191 chomp($modulefile); 192 $filename = $modulefile; 193 if ($filename eq "") {
··· 184 185 # if it's a module, we need to find the .ko file and calculate a load offset 186 if ($module ne "") { 187 + my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`; 188 chomp($modulefile); 189 $filename = $modulefile; 190 if ($filename eq "") {
+2 -1
scripts/tags.sh
··· 101 -I ____cacheline_aligned_in_smp \ 102 -I ____cacheline_internodealigned_in_smp \ 103 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 104 - --extra=+f --c-kinds=+px \ 105 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \ 106 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' 107
··· 101 -I ____cacheline_aligned_in_smp \ 102 -I ____cacheline_internodealigned_in_smp \ 103 -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ 104 + -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ 105 + --extra=+f --c-kinds=-px \ 106 --regex-asm='/^ENTRY\(([^)]*)\).*/\1/' \ 107 --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/' 108
+2
usr/.gitignore
··· 4 gen_init_cpio 5 initramfs_data.cpio 6 initramfs_data.cpio.gz 7 initramfs_list 8 include
··· 4 gen_init_cpio 5 initramfs_data.cpio 6 initramfs_data.cpio.gz 7 + initramfs_data.cpio.bz2 8 + initramfs_data.cpio.lzma 9 initramfs_list 10 include
+1 -1
usr/Makefile
··· 6 PHONY += klibcdirs 7 8 9 - # Gzip, but no bzip2 10 suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz 11 12 # Bzip2
··· 6 PHONY += klibcdirs 7 8 9 + # Gzip 10 suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP) = .gz 11 12 # Bzip2