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