]> Pileus Git - ~andy/linux/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 22:37:02 +0000 (15:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 22:37:02 +0000 (15:37 -0700)
* 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

94 files changed:
Documentation/kbuild/kbuild.txt
Documentation/kbuild/makefiles.txt
Makefile
arch/arm/Makefile
arch/arm/boot/install.sh
arch/arm/kernel/Makefile
arch/arm/kernel/init_task.c
arch/avr32/kernel/init_task.c
arch/avr32/mm/init.c
arch/blackfin/Makefile
arch/blackfin/boot/install.sh
arch/cris/Makefile
arch/cris/kernel/Makefile
arch/cris/kernel/process.c
arch/frv/kernel/init_task.c
arch/h8300/kernel/init_task.c
arch/ia64/install.sh
arch/ia64/kernel/Makefile.gate
arch/ia64/kernel/init_task.c
arch/m32r/boot/compressed/install.sh
arch/m32r/kernel/init_task.c
arch/m68k/install.sh
arch/m68k/kernel/process.c
arch/m68knommu/kernel/init_task.c
arch/microblaze/kernel/init_task.c
arch/mips/Makefile
arch/mips/kernel/init_task.c
arch/mips/kernel/vmlinux.lds.S
arch/mn10300/kernel/init_task.c
arch/parisc/Makefile
arch/parisc/install.sh
arch/parisc/kernel/init_task.c
arch/powerpc/Makefile
arch/powerpc/boot/install.sh
arch/powerpc/kernel/init_task.c
arch/powerpc/kernel/machine_kexec_64.c
arch/powerpc/kernel/vdso.c
arch/powerpc/kernel/vdso32/Makefile
arch/powerpc/kernel/vdso32/vdso32_wrapper.S
arch/powerpc/kernel/vdso64/Makefile
arch/powerpc/kernel/vdso64/vdso64_wrapper.S
arch/s390/boot/install.sh
arch/s390/kernel/init_task.c
arch/s390/kernel/vdso.c
arch/s390/kernel/vdso32/Makefile
arch/s390/kernel/vdso32/vdso32_wrapper.S
arch/s390/kernel/vdso64/Makefile
arch/s390/kernel/vdso64/vdso64_wrapper.S
arch/score/kernel/init_task.c
arch/sh/boot/compressed/install.sh
arch/sh/kernel/init_task.c
arch/sh/kernel/irq.c
arch/sh/kernel/vsyscall/Makefile
arch/sparc/Makefile
arch/sparc/kernel/Makefile
arch/sparc/kernel/init_task.c
arch/um/Makefile
arch/um/kernel/Makefile
arch/um/kernel/init_task.c
arch/um/kernel/vmlinux.lds.S
arch/x86/Makefile
arch/x86/boot/install.sh
arch/x86/include/asm/cache.h
arch/x86/kernel/head_32.S
arch/x86/kernel/head_64.S
arch/x86/kernel/init_task.c
arch/x86/vdso/Makefile
arch/xtensa/kernel/Makefile
arch/xtensa/kernel/head.S
arch/xtensa/kernel/init_task.c
include/linux/linkage.h
init/Kconfig
lib/Kconfig.debug
scripts/Kbuild.include
scripts/Makefile.build
scripts/basic/docproc.c
scripts/basic/fixdep.c
scripts/basic/hash.c
scripts/checkincludes.pl
scripts/kconfig/conf.c
scripts/kconfig/confdata.c
scripts/kconfig/expr.c
scripts/kconfig/gconf.c
scripts/kconfig/gconf.glade
scripts/kconfig/kxgettext.c
scripts/kconfig/lkc_proto.h
scripts/kconfig/mconf.c
scripts/kconfig/menu.c
scripts/kconfig/qconf.cc
scripts/kconfig/symbol.c
scripts/markup_oops.pl
scripts/tags.sh
usr/.gitignore
usr/Makefile

index f3355b6812df1a439e5d53ad24df6375cc3ad940..bb3bf38f03dac1e055dc973ce65d49d14defbe42 100644 (file)
@@ -65,6 +65,22 @@ INSTALL_PATH
 INSTALL_PATH specifies where to place the updated kernel and system map
 images. Default is /boot, but you can set it to other values.
 
+INSTALLKERNEL
+--------------------------------------------------
+Install script called when using "make install".
+The default name is "installkernel".
+
+The script will be called with the following arguments:
+    $1 - kernel version
+    $2 - kernel image file
+    $3 - kernel map file
+    $4 - default install path (use root directory if blank)
+
+The implmentation of "make install" is architecture specific
+and it may differ from the above.
+
+INSTALLKERNEL is provided to enable the possibility to
+specify a custom installer when cross compiling a kernel.
 
 MODLIB
 --------------------------------------------------
index d76cfd8712e124905807332fba8b3feee89306f2..71c602d61680d422694a81c08b0cd4f802e18e7c 100644 (file)
@@ -18,6 +18,7 @@ This document describes the Linux kernel Makefiles.
           --- 3.9 Dependency tracking
           --- 3.10 Special Rules
           --- 3.11 $(CC) support functions
+          --- 3.12 $(LD) support functions
 
        === 4 Host Program support
           --- 4.1 Simple Host Program
@@ -435,14 +436,14 @@ more details, with real examples.
        The second argument is optional, and if supplied will be used
        if first argument is not supported.
 
-    ld-option
-       ld-option is used to check if $(CC) when used to link object files
+    cc-ldoption
+       cc-ldoption is used to check if $(CC) when used to link object files
        supports the given option.  An optional second option may be
        specified if first option are not supported.
 
        Example:
                #arch/i386/kernel/Makefile
-               vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv)
+               vsyscall-flags += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
        In the above example, vsyscall-flags will be assigned the option
        -Wl$(comma)--hash-style=sysv if it is supported by $(CC).
@@ -570,6 +571,19 @@ more details, with real examples.
                        endif
                endif
 
+--- 3.12 $(LD) support functions
+
+    ld-option
+       ld-option is used to check if $(LD) supports the supplied option.
+       ld-option takes two options as arguments.
+       The second argument is an optional option that can be used if the
+       first option is not supported by $(LD).
+
+       Example:
+               #Makefile
+               LDFLAGS_vmlinux += $(call really-ld-option, -X)
+
+
 === 4 Host Program support
 
 Kbuild supports building executables on the host for use during the
index 433493a2b77baacc36152f30f88fd2b1e7f83db4..f908accd332b877338fdf92380bf52e3734f8cec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -179,9 +179,46 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 # Alternatively CROSS_COMPILE can be set in the environment.
 # Default value for CROSS_COMPILE is not to prefix executables
 # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+#
+# To force ARCH and CROSS_COMPILE settings include kernel.* files
+# in the kernel tree - do not patch this file.
 export KBUILD_BUILDHOST := $(SUBARCH)
-ARCH           ?= $(SUBARCH)
-CROSS_COMPILE  ?=
+
+# Kbuild save the ARCH and CROSS_COMPILE setting in kernel.* files.
+# Restore these settings and check that user did not specify
+# conflicting values.
+
+saved_arch  := $(shell cat include/generated/kernel.arch  2> /dev/null)
+saved_cross := $(shell cat include/generated/kernel.cross 2> /dev/null)
+
+ifneq ($(CROSS_COMPILE),)
+        ifneq ($(saved_cross),)
+                ifneq ($(CROSS_COMPILE),$(saved_cross))
+                        $(error CROSS_COMPILE changed from \
+                                "$(saved_cross)" to \
+                                 to "$(CROSS_COMPILE)". \
+                                 Use "make mrproper" to fix it up)
+                endif
+        endif
+else
+    CROSS_COMPILE := $(saved_cross)
+endif
+
+ifneq ($(ARCH),)
+        ifneq ($(saved_arch),)
+                ifneq ($(saved_arch),$(ARCH))
+                        $(error ARCH changed from \
+                                "$(saved_arch)" to "$(ARCH)". \
+                                 Use "make mrproper" to fix it up)
+                endif
+        endif
+else
+        ifneq ($(saved_arch),)
+                ARCH := $(saved_arch)
+        else
+                ARCH := $(SUBARCH)
+        endif
+endif
 
 # Architecture as present in compile.h
 UTS_MACHINE    := $(ARCH)
@@ -315,6 +352,7 @@ OBJCOPY             = $(CROSS_COMPILE)objcopy
 OBJDUMP                = $(CROSS_COMPILE)objdump
 AWK            = awk
 GENKSYMS       = scripts/genksyms/genksyms
+INSTALLKERNEL  := installkernel
 DEPMOD         = /sbin/depmod
 KALLSYMS       = scripts/kallsyms
 PERL           = perl
@@ -353,7 +391,8 @@ KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
 export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
 export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
-export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
+export CPP AR NM STRIP OBJCOPY OBJDUMP
+export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE
 export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
 
 export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
@@ -444,6 +483,11 @@ ifeq ($(config-targets),1)
 include $(srctree)/arch/$(SRCARCH)/Makefile
 export KBUILD_DEFCONFIG KBUILD_KCONFIG
 
+# save ARCH & CROSS_COMPILE settings
+$(shell mkdir -p include/generated &&                            \
+        echo $(ARCH)          > include/generated/kernel.arch && \
+        echo $(CROSS_COMPILE) > include/generated/kernel.cross)
+
 config: scripts_basic outputmakefile FORCE
        $(Q)mkdir -p include/linux include/config
        $(Q)$(MAKE) $(build)=scripts/kconfig $@
@@ -571,6 +615,9 @@ KBUILD_CFLAGS       += $(call cc-option,-fno-strict-overflow)
 # revert to pre-gcc-4.4 behaviour of .eh_frame
 KBUILD_CFLAGS  += $(call cc-option,-fno-dwarf2-cfi-asm)
 
+# conserve stack if available
+KBUILD_CFLAGS   += $(call cc-option,-fconserve-stack)
+
 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
 # But warn user when we do so
 warn-assign = \
@@ -591,12 +638,12 @@ endif
 
 # Use --build-id when available.
 LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
-                             $(call ld-option, -Wl$(comma)--build-id,))
+                             $(call cc-ldoption, -Wl$(comma)--build-id,))
 LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
 LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
 
 ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
-LDFLAGS_vmlinux        += -X
+LDFLAGS_vmlinux        += $(call ld-option, -X,)
 endif
 
 # Default kernel image to build when no specific target is given.
@@ -980,11 +1027,6 @@ prepare0: archprepare FORCE
 # All the preparing..
 prepare: prepare0
 
-# Leave this as default for preprocessing vmlinux.lds.S, which is now
-# done in arch/$(ARCH)/kernel/Makefile
-
-export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
-
 # The asm symlink changes when $(ARCH) changes.
 # Detect this and ask user to run make mrproper
 # If asm is a stale symlink (point to dir that does not exist) remove it
index 54661125a8bfff2b69a1daee5d6de3ae5ebd1395..a73caaf667633c286e8812da535aa43203170134 100644 (file)
@@ -14,7 +14,7 @@ LDFLAGS_vmlinux       :=-p --no-undefined -X
 ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
 LDFLAGS_vmlinux        += --be8
 endif
-CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
+
 OBJCOPYFLAGS   :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
 GZFLAGS                :=-9
 #KBUILD_CFLAGS +=-pipe
@@ -279,7 +279,7 @@ define archhelp
   echo  '                  (supply initrd image via make variable INITRD=<path>)'
   echo  '  install       - Install uncompressed kernel'
   echo  '  zinstall      - Install compressed kernel'
-  echo  '                  Install using (your) ~/bin/installkernel or'
-  echo  '                  (distribution) /sbin/installkernel or'
+  echo  '                  Install using (your) ~/bin/$(INSTALLKERNEL) or'
+  echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
   echo  '                  install to $$(INSTALL_PATH) and run lilo'
 endef
index 9f9bed207345603d2d99471dcbfeef90ca2d1b70..06ea7d42ce8e6bb9f72633a14abd2ace113fa712 100644 (file)
@@ -21,8 +21,8 @@
 #
 
 # User may have a custom install script
-if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
-if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 if [ "$(basename $2)" = "zImage" ]; then
 # Compressed install
index 3213c9382b171aa14e7f00d1c7ab86418a5ebef0..c446aeff7b893fb5764cc3716a6c81760cdee218 100644 (file)
@@ -2,7 +2,8 @@
 # Makefile for the linux kernel.
 #
 
-AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
+CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
+AFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
 
 ifdef CONFIG_DYNAMIC_FTRACE
 CFLAGS_REMOVE_ftrace.o = -pg
index 3f470866bb89ebe4f903db8dfb389313505df502..e7cbb50dc35678ec191bcc026a02e8e8036af612 100644 (file)
@@ -24,9 +24,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  *
  * The things we do for performance..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 57ec9f2dcd953b2ebe9270f1c9dbfa6cf99d2401..6b2343e6fe332cd5454bfe88935091ed96d1a482 100644 (file)
@@ -18,9 +18,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
 /*
  * Initial thread structure. Must be aligned on an 8192-byte boundary.
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 376f18c4a6cb90370ded166c29eaa614d3fcf108..94925641e53e64fbb87b2754b5d927be00a8b3ac 100644 (file)
 #include <asm/setup.h>
 #include <asm/sections.h>
 
-#define __page_aligned __attribute__((section(".data.page_aligned")))
-
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
-pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned;
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data;
 
 struct page *empty_zero_page;
 EXPORT_SYMBOL(empty_zero_page);
index 6f9533c3d752b6d718ad4712a8de66624ffb49ba..f063b772934bbcf75461276d680feba35c5e1574 100644 (file)
@@ -155,7 +155,7 @@ define archhelp
   echo  '* vmImage.gz      - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)'
   echo  '  vmImage.lzma    - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)'
   echo  '  install         - Install kernel using'
-  echo  '                     (your) ~/bin/$(CROSS_COMPILE)installkernel or'
-  echo  '                     (distribution) PATH: $(CROSS_COMPILE)installkernel or'
+  echo  '                     (your) ~/bin/$(INSTALLKERNEL) or'
+  echo  '                     (distribution) PATH: $(INSTALLKERNEL) or'
   echo  '                     install to $$(INSTALL_PATH)'
 endef
index 9560a6b291009db0b04b9256d5bd241a35700b38..e2c6e40902b7e45961c5878b782f7c941cc8d3b8 100644 (file)
@@ -36,9 +36,9 @@ verify "$3"
 
 # User may have a custom install script
 
-if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
-if which ${CROSS_COMPILE}installkernel >/dev/null 2>&1; then
-       exec ${CROSS_COMPILE}installkernel "$@"
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if which ${INSTALLKERNEL} >/dev/null 2>&1; then
+       exec ${INSTALLKERNEL} "$@"
 fi
 
 # Default install - same as make zlilo
index 71e17d3eeddba6d8119378e414a4bc742a26a5d9..29c2ceb38a76dd05fb98e9728e53b2d0753df0df 100644 (file)
@@ -42,8 +42,6 @@ LD = $(CROSS_COMPILE)ld -mcrislinux
 
 OBJCOPYFLAGS := -O binary -R .note -R .comment -S
 
-CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
-
 KBUILD_AFLAGS += -mlinux -march=$(arch-y) $(inc)
 KBUILD_CFLAGS += -mlinux -march=$(arch-y) -pipe $(inc)
 KBUILD_CPPFLAGS += $(inc)
index ee7bcd4d20b270d0427b62f40c0895a9aa3eec77..b45640b3e6006cf3b5da0c5b5330534d7520fe3a 100644 (file)
@@ -3,6 +3,7 @@
 # Makefile for the linux kernel.
 #
 
+CPPFLAGS_vmlinux.lds := -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
 extra-y        := vmlinux.lds
 
 obj-y   := process.o traps.o irq.o ptrace.o setup.o time.o sys_cris.o
index 51dcd04d2777f01b87a86108d500efb800be1d2d..c99aeab7cef727b0cf6ebf18f93216f715d49216 100644 (file)
@@ -45,9 +45,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union 
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 1d3df1d9495c3379180ad6b9cf683cc9b5f24b25..3c3e0b336a9d8e1e6e1e04fe32bd4e1f683761f6 100644 (file)
@@ -19,9 +19,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 089c65ed6eb327c5e8ffa39e5a69a5c6e5d86921..54c1062ee80ed431f911d598f40894b470c9b47f 100644 (file)
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
index 929e780026d13bbd35786c54fc2433857d101954..0e932f5dcd1a6021b6de9b6826dbfddb771b0088 100644 (file)
@@ -21,8 +21,8 @@
 
 # User may have a custom install script
 
-if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
-if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 # Default install - same as make zlilo
 
index 1d87f84069b31420f6d138aa618a49756004e937..ab9b03a9adcc4680fd369730e319eeac8fde4728 100644 (file)
@@ -10,7 +10,7 @@ quiet_cmd_gate = GATE $@
       cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
 
 GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
-                    $(call ld-option, -Wl$(comma)--hash-style=sysv)
+                    $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
        $(call if_changed,gate)
 
index c475fc281be755accd969935eb8bd278069a1ffe..e253ab8fcbc8923a789dc12e0afae0dcbf7891b7 100644 (file)
@@ -33,7 +33,8 @@ union {
                struct thread_info thread_info;
        } s;
        unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
-} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{
+} init_task_mem asm ("init_task") __init_task_data =
+       {{
        .task =         INIT_TASK(init_task_mem.s.task),
        .thread_info =  INIT_THREAD_INFO(init_task_mem.s.task)
 }};
index 6d72e9e72697c9c3132750527f8abeacc2c97786..16e5a0a134375ec3c7f6f785801bed0d1a45c798 100644 (file)
@@ -24,8 +24,8 @@
 
 # User may have a custom install script
 
-if [ -x /sbin/installkernel ]; then
-  exec /sbin/installkernel "$@"
+if [ -x /sbin/${INSTALLKERNEL} ]; then
+  exec /sbin/${INSTALLKERNEL} "$@"
 fi
 
 if [ "$2" = "zImage" ]; then
index fce57e5d3f913950b96c5185209bc3e9b066f986..6c42d5f8df50f1dc20c622065f8cbe22be5a64e5 100644 (file)
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 9c6bae6112e3ff16a4863a3d09e99d2fa8a500f7..57d640d4382c3883e79961e92c04d8f79aaeadaf 100644 (file)
@@ -33,8 +33,8 @@ verify "$3"
 
 # User may have a custom install script
 
-if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
-if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 # Default install - same as make zlilo
 
index 72bad65dba3a1d3b4091f074c22207aa8f9a277b..41230c595a8ee93f32f101544bf62556be6ffcdd 100644 (file)
@@ -42,9 +42,9 @@
  */
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-union thread_union init_thread_union
-__attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
-       = { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data
+       __attribute__((aligned(THREAD_SIZE))) =
+               { INIT_THREAD_INFO(init_task) };
 
 /* initial task structure */
 struct task_struct init_task = INIT_TASK(init_task);
index 45e97a207fedaf57a2cab44f97d7d0370cf95e2b..cbf9dc3cc51dc6a8a8d297fa99d7b9d349100a03 100644 (file)
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
index 67da22579b62190215d743a2dd33a6c9fe5c0e83..b5d711f94ff85da0f8c28103d7be857635e29010 100644 (file)
@@ -19,9 +19,8 @@
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
 
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-{ INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 struct task_struct init_task = INIT_TASK(init_task);
 EXPORT_SYMBOL(init_task);
index c825b14b4ed05427367a694194f5bc2a82a12d99..77f5021218d3e2dec0e5d30a3544cc64940a7a9c 100644 (file)
@@ -627,16 +627,6 @@ endif
 cflags-y                       += -I$(srctree)/arch/mips/include/asm/mach-generic
 drivers-$(CONFIG_PCI)          += arch/mips/pci/
 
-ifdef CONFIG_32BIT
-ifdef CONFIG_CPU_LITTLE_ENDIAN
-JIFFIES                        = jiffies_64
-else
-JIFFIES                        = jiffies_64 + 4
-endif
-else
-JIFFIES                        = jiffies_64
-endif
-
 #
 # Automatically detect the build format. By default we choose
 # the elf format according to the load address.
@@ -660,8 +650,9 @@ ifdef CONFIG_64BIT
 endif
 
 KBUILD_AFLAGS  += $(cflags-y)
-KBUILD_CFLAGS  += $(cflags-y) \
-                       -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
+KBUILD_CFLAGS  += $(cflags-y)
+KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
+KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
 
 LDFLAGS                        += -m $(ld-emul)
 
@@ -676,18 +667,6 @@ endif
 
 OBJCOPYFLAGS           += --remove-section=.reginfo
 
-#
-# Choosing incompatible machines durings configuration will result in
-# error messages during linking.  Select a default linkscript if
-# none has been choosen above.
-#
-
-CPPFLAGS_vmlinux.lds := \
-       $(KBUILD_CFLAGS) \
-       -D"LOADADDR=$(load-y)" \
-       -D"JIFFIES=$(JIFFIES)" \
-       -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
-
 head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o
 
 libs-y                 += arch/mips/lib/
index 5b457a40c784f84997c9bc24c17de910ecbe61b3..6d6ca53058951307ad992cac83c0325c389ff556 100644 (file)
@@ -21,9 +21,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  *
  * The things we do for performance..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"),
-                      __aligned__(THREAD_SIZE))) =
+union thread_union init_thread_union __init_task_data
+       __attribute__((__aligned__(THREAD_SIZE))) =
                { INIT_THREAD_INFO(init_task) };
 
 /*
index 2769bed3d2afcb0af8b3ebb351ed39c5f5ba609a..9bf0e3df7c5a6191e6d322c3a431b662d739b931 100644 (file)
@@ -10,7 +10,16 @@ PHDRS {
        text PT_LOAD FLAGS(7);  /* RWX */
        note PT_NOTE FLAGS(4);  /* R__ */
 }
-jiffies = JIFFIES;
+
+ifdef CONFIG_32BIT
+       ifdef CONFIG_CPU_LITTLE_ENDIAN
+               jiffies  = jiffies_64;
+       else
+               jiffies  = jiffies_64 + 4;
+       endif
+else
+       jiffies  = jiffies_64;
+endif
 
 SECTIONS
 {
@@ -29,7 +38,7 @@ SECTIONS
        /* . = 0xa800000000300000; */
        . = 0xffffffff80300000;
 #endif
-       . = LOADADDR;
+       . = VMLINUX_LOAD_ADDRESS;
        /* read-only */
        _text = .;      /* Text and read-only data */
        .text : {
index 80d423b80af30cfebbf7364829153c6f3314a3b1..a481b043bea782bfdb804e61c1858ba54cd17229 100644 (file)
@@ -27,9 +27,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index da6f66901c92191c2069ba2dbd8144951584936b..55cca1dac431bc80c1e9ea5f34274be2022e4494 100644 (file)
@@ -118,8 +118,8 @@ define archhelp
        @echo  '* vmlinux       - Uncompressed kernel image (./vmlinux)'
        @echo  '  palo          - Bootable image (./lifimage)'
        @echo  '  install       - Install kernel using'
-       @echo  '                  (your) ~/bin/installkernel or'
-       @echo  '                  (distribution) /sbin/installkernel or'
+       @echo  '                  (your) ~/bin/$(INSTALLKERNEL) or'
+       @echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
        @echo  '                  copy to $$(INSTALL_PATH)'
 endef
 
index 9632b3e164c719f0a9e0adc06e8e6d79b121f6a9..e593fc8d58bcd8ef6ccab425aba077a9a91597b7 100644 (file)
@@ -21,8 +21,8 @@
 
 # User may have a custom install script
 
-if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
-if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 # Default install
 
index 82974b20fc106b85c0462cc83e78eb2c3201a1c4..d020eae6525c4a200e9bcab86b6b8beb3e2ef5b3 100644 (file)
@@ -43,8 +43,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data
+       __attribute__((aligned(128))) =
                { INIT_THREAD_INFO(init_task) };
 
 #if PT_NLEVELS == 3
index 952a3963e9e8b607e15fb7ffc21d8f8d5482dd8b..aacf629c1a9f87b3225a0d25877eb0486d4d8d5f 100644 (file)
@@ -158,8 +158,6 @@ drivers-$(CONFIG_OPROFILE)  += arch/powerpc/oprofile/
 # Default to zImage, override when needed
 all: zImage
 
-CPPFLAGS_vmlinux.lds   := -Upowerpc
-
 BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
 
 PHONY += $(BOOT_TARGETS)
@@ -182,8 +180,8 @@ define archhelp
   @echo '  simpleImage.<dt> - Firmware independent image.'
   @echo '  treeImage.<dt>  - Support for older IBM 4xx firmware (not U-Boot)'
   @echo '  install         - Install kernel using'
-  @echo '                    (your) ~/bin/installkernel or'
-  @echo '                    (distribution) /sbin/installkernel or'
+  @echo '                    (your) ~/bin/$(INSTALLKERNEL) or'
+  @echo '                    (distribution) /sbin/$(INSTALLKERNEL) or'
   @echo '                    install to $$(INSTALL_PATH) and run lilo'
   @echo '  *_defconfig     - Select default config from arch/$(ARCH)/configs'
   @echo ''
index 98312d169c859926932356cd7018a57ffed23e9f..b6a256bc96ee2c08c0dbc073c35d15118919efd3 100644 (file)
@@ -23,8 +23,8 @@ set -e
 
 # User may have a custom install script
 
-if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
-if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 # Default install
 
index ffc4253fef55e99a59070b09f1b912e51bfb4de8..2375b7eb1c7601e00c102bc538be1ebd54dc4db2 100644 (file)
@@ -16,9 +16,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union 
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 49e705fcee6df804545dd790b6cd0dc7fb6d7ada..040bd1de8d99b68b46d36008aca44420ffd180c3 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/kexec.h>
 #include <linux/smp.h>
 #include <linux/thread_info.h>
+#include <linux/init_task.h>
 #include <linux/errno.h>
 
 #include <asm/page.h>
@@ -249,8 +250,8 @@ static void kexec_prepare_cpus(void)
  * We could use a smaller stack if we don't care about anything using
  * current, but that audit has not been performed.
  */
-static union thread_union kexec_stack
-       __attribute__((__section__(".data.init_task"))) = { };
+static union thread_union kexec_stack __init_task_data =
+       { };
 
 /* Our assembly helper, in kexec_stub.S */
 extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
index a0abce251d0a0ae1021e1012fdc9b37fff31c7c6..3faaf29bdb29def5748cf54beef11a285764e438 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  *    Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
  *                      <benh@kernel.crashing.org>
@@ -74,7 +75,7 @@ static int vdso_ready;
 static union {
        struct vdso_data        data;
        u8                      page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __page_aligned_data;
 struct vdso_data *vdso_data = &vdso_data_store.data;
 
 /* Format of the patch table */
index b54b81688132bab49851646f7b3697ee65bae5c0..51ead52141bd083774ed3ed13d8c71dc831f0f23 100644 (file)
@@ -16,7 +16,7 @@ GCOV_PROFILE := n
 
 EXTRA_CFLAGS := -shared -fno-common -fno-builtin
 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
-               $(call ld-option, -Wl$(comma)--hash-style=sysv)
+               $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 EXTRA_AFLAGS := -D__VDSO32__ -s
 
 obj-y += vdso32_wrapper.o
index 556f0caa5d842a27885a6c2417787c18315037dc..6e8f507ed32bb5f74f9d9f5574f09636ae15f9a3 100644 (file)
@@ -1,7 +1,8 @@
 #include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/page.h>
 
-       .section ".data.page_aligned"
+       __PAGE_ALIGNED_DATA
 
        .globl vdso32_start, vdso32_end
        .balign PAGE_SIZE
index dd0c8e9367751eb2cd3bc55795a819dbde4bc085..79da65d44a2a78a01bf11f2c0bb5b2003560ae6c 100644 (file)
@@ -11,7 +11,7 @@ GCOV_PROFILE := n
 
 EXTRA_CFLAGS := -shared -fno-common -fno-builtin
 EXTRA_CFLAGS += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
-               $(call ld-option, -Wl$(comma)--hash-style=sysv)
+               $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 EXTRA_AFLAGS := -D__VDSO64__ -s
 
 obj-y += vdso64_wrapper.o
index 0529cb9e3b97bfaef233858595f91cebb820ac96..b8553d62b792ffb2953a400fabdf8fc746c62501 100644 (file)
@@ -1,7 +1,8 @@
 #include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/page.h>
 
-       .section ".data.page_aligned"
+       __PAGE_ALIGNED_DATA
 
        .globl vdso64_start, vdso64_end
        .balign PAGE_SIZE
index d4026f62cb06d2ef804c63d63aa23079fd24325b..aed3069699bd5abf94ffbeb71a7db756b210b12f 100644 (file)
@@ -21,8 +21,8 @@
 
 # User may have a custom install script
 
-if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
-if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 # Default install - same as make zlilo
 
index fe787f9e5f3f375753291b01f1e135546b5875b6..4d1c9fb0b54086e852fdb2de11f88b247b1ca3a0 100644 (file)
@@ -25,9 +25,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union 
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 45e1708b70fd028fdd9b6b432f156f886855d0ae..45a3e9a7ae21db6f5705eac145fe62790e4c5b0f 100644 (file)
@@ -75,7 +75,7 @@ __setup("vdso=", vdso_setup);
 static union {
        struct vdso_data        data;
        u8                      page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __page_aligned_data;
 struct vdso_data *vdso_data = &vdso_data_store.data;
 
 /*
index ca78ad60ba2490c9d2bb7682ad23aa7b9e922ddb..d13e8755a8cce46e1a97a260893aaa6fd10c8767 100644 (file)
@@ -13,7 +13,7 @@ KBUILD_AFLAGS_31 += -m31 -s
 KBUILD_CFLAGS_31 := $(filter-out -m64,$(KBUILD_CFLAGS))
 KBUILD_CFLAGS_31 += -m31 -fPIC -shared -fno-common -fno-builtin
 KBUILD_CFLAGS_31 += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
-                       $(call ld-option, -Wl$(comma)--hash-style=sysv)
+                       $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_31)
 $(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_31)
index 61639a89e70b93e7c7355eb080c7afcf07e79b2d..ae42f8ce350bcb5047e6b553749fa6dc453295c7 100644 (file)
@@ -1,7 +1,8 @@
 #include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/page.h>
 
-       .section ".data.page_aligned"
+       __PAGE_ALIGNED_DATA
 
        .globl vdso32_start, vdso32_end
        .balign PAGE_SIZE
index 6fc8e829258c50be575bf1870d40ca4879b88a00..449352dda9cdb9a81209d3ff3f49cf61c0356a82 100644 (file)
@@ -13,7 +13,7 @@ KBUILD_AFLAGS_64 += -m64 -s
 KBUILD_CFLAGS_64 := $(filter-out -m64,$(KBUILD_CFLAGS))
 KBUILD_CFLAGS_64 += -m64 -fPIC -shared -fno-common -fno-builtin
 KBUILD_CFLAGS_64 += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
-                       $(call ld-option, -Wl$(comma)--hash-style=sysv)
+                       $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
 $(targets:%=$(obj)/%.dbg): KBUILD_CFLAGS = $(KBUILD_CFLAGS_64)
 $(targets:%=$(obj)/%.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_64)
index d8e2ac14d564d057bef615266bcf17abf90083cf..c245842b516fdfa490e2c877252730cfc8fb5589 100644 (file)
@@ -1,7 +1,8 @@
 #include <linux/init.h>
+#include <linux/linkage.h>
 #include <asm/page.h>
 
-       .section ".data.page_aligned"
+       __PAGE_ALIGNED_DATA
 
        .globl vdso64_start, vdso64_end
        .balign PAGE_SIZE
index ff952f6c63fd645a66f6e7614b22013cd51798c0..baa03ee217d1abdaaeb1081e0274090a6a1cf544 100644 (file)
@@ -34,9 +34,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"), __aligned__(THREAD_SIZE))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 90589f0fec1249fad44a41cae898852c97cbd0f0..f9f41818b17e7e0ae9b4f0dcb00f2dfedd3080b6 100644 (file)
@@ -23,8 +23,8 @@
 
 # User may have a custom install script
 
-if [ -x /sbin/installkernel ]; then
-  exec /sbin/installkernel "$@"
+if [ -x /sbin/${INSTALLKERNEL} ]; then
+  exec /sbin/${INSTALLKERNEL} "$@"
 fi
 
 if [ "$2" = "zImage" ]; then
index 1719957c0a691202b192da5c9a6329e810dcc44f..11f2ea556a6bc506f5c2cc3083a7cfff9a643801 100644 (file)
@@ -17,9 +17,8 @@ struct pt_regs fake_swapper_regs;
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 60f8af4497c78fc5fc051947f766966b1a19f3e2..7cb933ba49579d7c97391119cb18d1e6cbfe08d5 100644 (file)
@@ -165,11 +165,9 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
 }
 
 #ifdef CONFIG_IRQSTACKS
-static char softirq_stack[NR_CPUS * THREAD_SIZE]
-               __attribute__((__section__(".bss.page_aligned")));
+static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
 
-static char hardirq_stack[NR_CPUS * THREAD_SIZE]
-               __attribute__((__section__(".bss.page_aligned")));
+static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;
 
 /*
  * allocate per-cpu stacks for hardirq and for softirq processing
index 4bbce1cfa359991511127b6f53a3f58e2522f1d9..8f0ea5fc835cad01bd8caa79763a2023c28af0ab 100644 (file)
@@ -15,7 +15,7 @@ quiet_cmd_syscall = SYSCALL $@
 export CPPFLAGS_vsyscall.lds += -P -C -Ush
 
 vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1 \
-               $(call ld-option, -Wl$(comma)--hash-style=sysv)
+               $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 
 SYSCFLAGS_vsyscall-trapa.so    = $(vsyscall-flags)
 
index 467221dd57024107f544a320fa99daefe2212b63..dfe272d1446592e11d3fac78f2e402dcd35f868e 100644 (file)
@@ -31,7 +31,6 @@ export BITS    := 32
 #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7
 KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
 KBUILD_AFLAGS += -m32
-CPPFLAGS_vmlinux.lds += -m32
 
 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
 #  Since 2.5.40, the first stage is left not btfix-ed.
@@ -45,9 +44,6 @@ else
 
 CHECKFLAGS      += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
 
-# Undefine sparc when processing vmlinux.lds - it is used
-# And teach CPP we are doing 64 bit builds (for this case)
-CPPFLAGS_vmlinux.lds += -m64 -Usparc
 LDFLAGS              := -m elf64_sparc
 export BITS          := 64
 
index 3a048fad7ee238b1253d1c7de2312a462dad36d6..5b47fab9966e34e8030db1628a47e22a966dedb5 100644 (file)
@@ -7,7 +7,11 @@ ccflags-y := -Werror
 
 extra-y     := head_$(BITS).o
 extra-y     += init_task.o
-extra-y     += vmlinux.lds
+
+# Undefine sparc when processing vmlinux.lds - it is used
+# And teach CPP we are doing $(BITS) builds (for this case)
+CPPFLAGS_vmlinux.lds := -Usparc -m$(BITS)
+extra-y              += vmlinux.lds
 
 obj-$(CONFIG_SPARC32)   += entry.o wof.o wuf.o
 obj-$(CONFIG_SPARC32)   += etrap_32.o
index 28125c5b3d3c306e216012ac7b529fa6b0f33e0a..5fe3d65581f7627885b0f3cce00a2c1e51c21670 100644 (file)
@@ -18,6 +18,5 @@ EXPORT_SYMBOL(init_task);
  * If this is not aligned on a 8k boundry, then you should change code
  * in etrap.S which assumes it.
  */
-union thread_union init_thread_union
-       __attribute__((section (".data.init_task")))
-       = { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
index 0728def322342b8d0438cf4129893883f9daddea..fc633dbacf84b818e1f6ac64fff887852431526d 100644 (file)
@@ -96,11 +96,10 @@ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,)
        $(call cc-option, -fno-stack-protector,) \
        $(call cc-option, -fno-stack-protector-all,)
 
-CONFIG_KERNEL_STACK_ORDER ?= 2
-STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
-
-CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \
-       -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE)
+# Options used by linker script
+export LDS_START      := $(START)
+export LDS_ELF_ARCH   := $(ELF_ARCH)
+export LDS_ELF_FORMAT := $(ELF_FORMAT)
 
 # The wrappers will select whether using "malloc" or the kernel allocator.
 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
index 388ec0a3ea9b0f57cfffe0ad14eb411934069df5..1119233597a1eb2f3ac26a22bb4a05183f32b9d9 100644 (file)
@@ -3,6 +3,9 @@
 # Licensed under the GPL
 #
 
+CPPFLAGS_vmlinux.lds := -U$(SUBARCH) -DSTART=$(LDS_START) \
+                        -DELF_ARCH=$(LDS_ELF_ARCH)        \
+                        -DELF_FORMAT=$(LDS_ELF_FORMAT)
 extra-y := vmlinux.lds
 clean-files :=
 
index b25121b537d8dfb6d0588d1aaf4ebc9b915cc663..8aa77b61a5ff09458786c249b1419c8b9dac68ef 100644 (file)
@@ -30,9 +30,8 @@ EXPORT_SYMBOL(init_task);
  * "init_task" linker map entry..
  */
 
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 union thread_union cpu0_irqstack
        __attribute__((__section__(".data.init_irqstack"))) =
index f8aeb448aab62ba76584f9c0e497e1897e490c6b..16e49bfa2b426c6a324b7102a877a0fb14e94a4e 100644 (file)
@@ -1,3 +1,6 @@
+
+KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER);
+
 #ifdef CONFIG_LD_SCRIPT_STATIC
 #include "uml.lds.S"
 #else
index 7983c420eaf2a304843b9b0563b4811626720c71..a012ee8ef803302642a5eac1daa791fe8f7c617a 100644 (file)
@@ -179,8 +179,8 @@ archclean:
 define archhelp
   echo  '* bzImage      - Compressed kernel image (arch/x86/boot/bzImage)'
   echo  '  install      - Install kernel using'
-  echo  '                  (your) ~/bin/installkernel or'
-  echo  '                  (distribution) /sbin/installkernel or'
+  echo  '                  (your) ~/bin/$(INSTALLKERNEL) or'
+  echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
   echo  '                  install to $$(INSTALL_PATH) and run lilo'
   echo  '  fdimage      - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
   echo  '  fdimage144   - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)'
index 8d60ee15dfd9b2e5e4ff3808976ea8143e94c05a..d13ec1c386407b294d8baf4bdb1c4d07f11ab691 100644 (file)
@@ -33,8 +33,8 @@ verify "$3"
 
 # User may have a custom install script
 
-if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
-if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
+if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
+if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
 
 # Default install - same as make zlilo
 
index 5d367caa0e36c437e17cb29f76dc285d9b6d4a49..549860d3be8f1e8bb856e084e7fac225e6d53045 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_CACHE_H
 #define _ASM_X86_CACHE_H
 
+#include <linux/linkage.h>
+
 /* L1 cache line size */
 #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -13,7 +15,7 @@
 #ifdef CONFIG_SMP
 #define __cacheline_aligned_in_smp                                     \
        __attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT))))      \
-       __attribute__((__section__(".data.page_aligned")))
+       __page_aligned_data
 #endif
 #endif
 
index b766e8c7252d4f7815154ad2afd13baff874ea78..218aad7ee76e050202b95a7fc303c19d29697cc9 100644 (file)
@@ -608,7 +608,7 @@ ENTRY(initial_code)
 /*
  * BSS section
  */
-.section ".bss.page_aligned","wa"
+__PAGE_ALIGNED_BSS
        .align PAGE_SIZE_asm
 #ifdef CONFIG_X86_PAE
 swapper_pg_pmd:
@@ -626,7 +626,7 @@ ENTRY(empty_zero_page)
  * This starts the data section.
  */
 #ifdef CONFIG_X86_PAE
-.section ".data.page_aligned","wa"
+__PAGE_ALIGNED_DATA
        /* Page-aligned for the benefit of paravirt? */
        .align PAGE_SIZE_asm
 ENTRY(swapper_pg_dir)
index fa54f78e2a05c94862c56df144160e31474f481c..d0bc0a13a43789edd7f3d7d3d3ac5bebce95f209 100644 (file)
@@ -418,7 +418,7 @@ ENTRY(phys_base)
 ENTRY(idt_table)
        .skip IDT_ENTRIES * 16
 
-       .section .bss.page_aligned, "aw", @nobits
+       __PAGE_ALIGNED_BSS
        .align PAGE_SIZE
 ENTRY(empty_zero_page)
        .skip PAGE_SIZE
index 270ff83efc11d8dc27089a3fec085fdec9074b5b..3a54dcb9cd0e6c82b8b9231e88afd7305be6e5da 100644 (file)
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
  * way process stacks are handled. This is done by having a special
  * "init_task" linker map entry..
  */
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-               { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 /*
  * Initial task structure.
index 88112b49f02c163ce245039397c251725779fe0e..6b4ffedb93c9f62e2d65874c7d27ef056fd9e8b9 100644 (file)
@@ -122,7 +122,7 @@ quiet_cmd_vdso = VDSO    $@
                       $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
                       -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^)
 
-VDSO_LDFLAGS = -fPIC -shared $(call ld-option, -Wl$(comma)--hash-style=sysv)
+VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 GCOV_PROFILE := n
 
 #
index fe3186de6a336abf59cfd2f72b63d1bbc78d4721..6f56d95f2c1ea48f6c9c522d503fc78109c9492b 100644 (file)
@@ -27,7 +27,8 @@ sed-y = -e 's/(\(\.[a-z]*it\|\.ref\|\)\.text)/(\1.literal \1.text)/g' \
        -e 's/(\(\.text\.[a-z]*\))/(\1.literal \1)/g'
 
 quiet_cmd__cpp_lds_S = LDS     $@
-      cmd__cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ $< | sed $(sed-y) >$@
+      cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \
+                       | sed $(sed-y) >$@
 
 $(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE
        $(call if_changed_dep,_cpp_lds_S)
index d9ddc1ba761cf1d53f59cfb83c2c0405c4ab87cc..d215adcfd4ea19635fcbaec87a82b919592c57d6 100644 (file)
@@ -235,7 +235,7 @@ should_never_return:
  * BSS section
  */
        
-.section ".bss.page_aligned", "w"
+__PAGE_ALIGNED_BSS
 #ifdef CONFIG_MMU
 ENTRY(swapper_pg_dir)
        .fill   PAGE_SIZE, 1, 0
index c4302f0e4ba08a66b39023d13986dda288a4f487..cd122fb7e48affb0c98758462aa813dd4a382043 100644 (file)
@@ -23,9 +23,8 @@
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-union thread_union init_thread_union
-       __attribute__((__section__(".data.init_task"))) =
-{ INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+       { INIT_THREAD_INFO(init_task) };
 
 struct task_struct init_task = INIT_TASK(init_task);
 
index 691f59171c6c722e52faaeaed4e086d46f646eb2..5126cceb6ae97c7d401f197497f0a1311e55fe6f 100644 (file)
@@ -57,6 +57,7 @@
 
 #ifdef __ASSEMBLY__
 
+#ifndef LINKER_SCRIPT
 #define ALIGN __ALIGN
 #define ALIGN_STR __ALIGN_STR
 
@@ -66,6 +67,7 @@
   ALIGN; \
   name:
 #endif
+#endif /* LINKER_SCRIPT */
 
 #ifndef WEAK
 #define WEAK(name)        \
index 0aa6579504cc93757ea0ecd284fb7b6782029ff8..c7bac39d6c61b7da35e5ee1e9a8c9e33a2033807 100644 (file)
@@ -1006,14 +1006,6 @@ config SLUB_DEBUG
          SLUB sysfs support. /sys/slab will not exist and there will be
          no support for cache validation etc.
 
-config STRIP_ASM_SYMS
-       bool "Strip assembler-generated symbols during link"
-       default n
-       help
-         Strip internal assembler-generated symbols during a link (symbols
-         that look like '.Lxxx') so they don't pollute the output of
-         get_wchan() and suchlike.
-
 config COMPAT_BRK
        bool "Disable heap randomization"
        default y
index d57b12f59c8c3f0686eca5cbd416e5378177da8b..891155817bc6e05aa52abc88e2fe7f93a9c41baa 100644 (file)
@@ -50,6 +50,14 @@ config MAGIC_SYSRQ
          keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
          unless you really know what this hack does.
 
+config STRIP_ASM_SYMS
+       bool "Strip assembler-generated symbols during link"
+       default n
+       help
+         Strip internal assembler-generated symbols during a link (symbols
+         that look like '.Lxxx') so they don't pollute the output of
+         get_wchan() and suchlike.
+
 config UNUSED_SYMBOLS
        bool "Enable unused/obsolete exported symbols"
        default y if X86
index c29be8f902488f6175e584f97b2c8c873036d4b2..4f9c1908593bce72b1572d0a3efb95fd3f22f36f 100644 (file)
@@ -83,11 +83,12 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
 # is automatically cleaned up.
 try-run = $(shell set -e;              \
        TMP="$(TMPOUT).$$$$.tmp";       \
+       TMPO="$(TMPOUT).$$$$.o";        \
        if ($(1)) >/dev/null 2>&1;      \
        then echo "$(2)";               \
        else echo "$(3)";               \
        fi;                             \
-       rm -f "$$TMP")
+       rm -f "$$TMP" "$$TMPO")
 
 # as-option
 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
@@ -105,12 +106,12 @@ as-instr = $(call try-run,\
 # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
 
 cc-option = $(call try-run,\
-       $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
+       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
 
 # cc-option-yn
 # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
 cc-option-yn = $(call try-run,\
-       $(CC) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
+       $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
 
 # cc-option-align
 # Prefix align with either -falign or -malign
@@ -130,10 +131,15 @@ cc-fullversion = $(shell $(CONFIG_SHELL) \
 # Usage:  EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
 cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
 
+# cc-ldoption
+# Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both)
+cc-ldoption = $(call try-run,\
+       $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
+
 # ld-option
-# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
+# Usage: LDFLAGS += $(call ld-option, -X)
 ld-option = $(call try-run,\
-       $(CC) $(1) -nostdlib -xc /dev/null -o "$$TMP",$(1),$(2))
+       $(CC) /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2))
 
 ######
 
index 5c4b7a400c182b5725491c1c1e498d9f5e377702..341b58902ffced6d70801f6e90ea85f60bcee88d 100644 (file)
@@ -206,7 +206,7 @@ cmd_modversions =                                                   \
 endif
 
 ifdef CONFIG_FTRACE_MCOUNT_RECORD
-cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
+cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
        "$(if $(CONFIG_64BIT),64,32)" \
        "$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
        "$(if $(part-of-module),1,0)" "$(@)";
@@ -216,6 +216,7 @@ define rule_cc_o_c
        $(call echo-cmd,checksrc) $(cmd_checksrc)                         \
        $(call echo-cmd,cc_o_c) $(cmd_cc_o_c);                            \
        $(cmd_modversions)                                                \
+       $(call echo-cmd,record_mcount)                                    \
        $(cmd_record_mcount)                                              \
        scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' >    \
                                                      $(dot-target).tmp;  \
@@ -269,7 +270,8 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
 # Linker scripts preprocessor (.lds.S -> .lds)
 # ---------------------------------------------------------------------------
 quiet_cmd_cpp_lds_S = LDS     $@
-      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $<
+      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
+                            -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
 
 $(obj)/%.lds: $(src)/%.lds.S FORCE
        $(call if_changed_dep,cpp_lds_S)
index 99ca7a698687a5a0558b987b05ffb6c581c01141..79ab973fb43a42715d61092ce58d7408109e6eff 100644 (file)
@@ -71,7 +71,7 @@ FILELINE * docsection;
 
 static char *srctree, *kernsrctree;
 
-void usage (void)
+static void usage (void)
 {
        fprintf(stderr, "Usage: docproc {doc|depend} file\n");
        fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n");
@@ -84,7 +84,7 @@ void usage (void)
 /*
  * Execute kernel-doc with parameters given in svec
  */
-void exec_kernel_doc(char **svec)
+static void exec_kernel_doc(char **svec)
 {
        pid_t pid;
        int ret;
@@ -129,7 +129,7 @@ struct symfile
 struct symfile symfilelist[MAXFILES];
 int symfilecnt = 0;
 
-void add_new_symbol(struct symfile *sym, char * symname)
+static void add_new_symbol(struct symfile *sym, char * symname)
 {
        sym->symbollist =
           realloc(sym->symbollist, (sym->symbolcnt + 1) * sizeof(char *));
@@ -137,14 +137,14 @@ void add_new_symbol(struct symfile *sym, char * symname)
 }
 
 /* Add a filename to the list */
-struct symfile * add_new_file(char * filename)
+static struct symfile * add_new_file(char * filename)
 {
        symfilelist[symfilecnt++].filename = strdup(filename);
        return &symfilelist[symfilecnt - 1];
 }
 
 /* Check if file already are present in the list */
-struct symfile * filename_exist(char * filename)
+static struct symfile * filename_exist(char * filename)
 {
        int i;
        for (i=0; i < symfilecnt; i++)
@@ -157,20 +157,20 @@ struct symfile * filename_exist(char * filename)
  * List all files referenced within the template file.
  * Files are separated by tabs.
  */
-void adddep(char * file)                  { printf("\t%s", file); }
-void adddep2(char * file, char * line)     { line = line; adddep(file); }
-void noaction(char * line)                { line = line; }
-void noaction2(char * file, char * line)   { file = file; line = line; }
+static void adddep(char * file)                   { printf("\t%s", file); }
+static void adddep2(char * file, char * line)     { line = line; adddep(file); }
+static void noaction(char * line)                 { line = line; }
+static void noaction2(char * file, char * line)   { file = file; line = line; }
 
 /* Echo the line without further action */
-void printline(char * line)               { printf("%s", line); }
+static void printline(char * line)               { printf("%s", line); }
 
 /*
  * Find all symbols in filename that are exported with EXPORT_SYMBOL &
  * EXPORT_SYMBOL_GPL (& EXPORT_SYMBOL_GPL_FUTURE implicitly).
  * All symbols located are stored in symfilelist.
  */
-void find_export_symbols(char * filename)
+static void find_export_symbols(char * filename)
 {
        FILE * fp;
        struct symfile *sym;
@@ -227,7 +227,7 @@ void find_export_symbols(char * filename)
  * intfunc uses -nofunction
  * extfunc uses -function
  */
-void docfunctions(char * filename, char * type)
+static void docfunctions(char * filename, char * type)
 {
        int i,j;
        int symcnt = 0;
@@ -258,15 +258,15 @@ void docfunctions(char * filename, char * type)
        fflush(stdout);
        free(vec);
 }
-void intfunc(char * filename) {        docfunctions(filename, NOFUNCTION); }
-void extfunc(char * filename) { docfunctions(filename, FUNCTION);   }
+static void intfunc(char * filename) { docfunctions(filename, NOFUNCTION); }
+static void extfunc(char * filename) { docfunctions(filename, FUNCTION);   }
 
 /*
  * Document specific function(s) in a file.
  * Call kernel-doc with the following parameters:
  * kernel-doc -docbook -function function1 [-function function2]
  */
-void singfunc(char * filename, char * line)
+static void singfunc(char * filename, char * line)
 {
        char *vec[200]; /* Enough for specific functions */
         int i, idx = 0;
@@ -297,7 +297,7 @@ void singfunc(char * filename, char * line)
  * Call kernel-doc with the following parameters:
  * kernel-doc -docbook -function "doc section" filename
  */
-void docsect(char *filename, char *line)
+static void docsect(char *filename, char *line)
 {
        char *vec[6]; /* kerneldoc -docbook -function "section" file NULL */
        char *s;
@@ -324,7 +324,7 @@ void docsect(char *filename, char *line)
  * 5) Lines containing !P
  * 6) Default lines - lines not matching the above
  */
-void parse_file(FILE *infile)
+static void parse_file(FILE *infile)
 {
        char line[MAXLINESZ];
        char * s;
index 8ab44861168087b01e3d3a643704e3ba6efe1129..6bf21f83837dff5a42893d57dde41e8d225948e4 100644 (file)
@@ -124,7 +124,7 @@ char *target;
 char *depfile;
 char *cmdline;
 
-void usage(void)
+static void usage(void)
 {
        fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
        exit(1);
@@ -133,7 +133,7 @@ void usage(void)
 /*
  * Print out the commandline prefixed with cmd_<target filename> :=
  */
-void print_cmdline(void)
+static void print_cmdline(void)
 {
        printf("cmd_%s := %s\n\n", target, cmdline);
 }
@@ -146,7 +146,7 @@ int    len_config  = 0;
  * Grow the configuration string to a desired length.
  * Usually the first growth is plenty.
  */
-void grow_config(int len)
+static void grow_config(int len)
 {
        while (len_config + len > size_config) {
                if (size_config == 0)
@@ -162,7 +162,7 @@ void grow_config(int len)
 /*
  * Lookup a value in the configuration string.
  */
-int is_defined_config(const char * name, int len)
+static int is_defined_config(const char * name, int len)
 {
        const char * pconfig;
        const char * plast = str_config + len_config - len;
@@ -178,7 +178,7 @@ int is_defined_config(const char * name, int len)
 /*
  * Add a new value to the configuration string.
  */
-void define_config(const char * name, int len)
+static void define_config(const char * name, int len)
 {
        grow_config(len + 1);
 
@@ -190,7 +190,7 @@ void define_config(const char * name, int len)
 /*
  * Clear the set of configuration strings.
  */
-void clear_config(void)
+static void clear_config(void)
 {
        len_config = 0;
        define_config("", 0);
@@ -199,7 +199,7 @@ void clear_config(void)
 /*
  * Record the use of a CONFIG_* word.
  */
-void use_config(char *m, int slen)
+static void use_config(char *m, int slen)
 {
        char s[PATH_MAX];
        char *p;
@@ -220,7 +220,7 @@ void use_config(char *m, int slen)
        printf("    $(wildcard include/config/%s.h) \\\n", s);
 }
 
-void parse_config_file(char *map, size_t len)
+static void parse_config_file(char *map, size_t len)
 {
        int *end = (int *) (map + len);
        /* start at +1, so that p can never be < map */
@@ -254,7 +254,7 @@ void parse_config_file(char *map, size_t len)
 }
 
 /* test is s ends in sub */
-int strrcmp(char *s, char *sub)
+static int strrcmp(char *s, char *sub)
 {
        int slen = strlen(s);
        int sublen = strlen(sub);
@@ -265,7 +265,7 @@ int strrcmp(char *s, char *sub)
        return memcmp(s + slen - sublen, sub, sublen);
 }
 
-void do_config_file(char *filename)
+static void do_config_file(char *filename)
 {
        struct stat st;
        int fd;
@@ -296,7 +296,7 @@ void do_config_file(char *filename)
        close(fd);
 }
 
-void parse_dep_file(void *map, size_t len)
+static void parse_dep_file(void *map, size_t len)
 {
        char *m = map;
        char *end = m + len;
@@ -336,7 +336,7 @@ void parse_dep_file(void *map, size_t len)
        printf("$(deps_%s):\n", target);
 }
 
-void print_deps(void)
+static void print_deps(void)
 {
        struct stat st;
        int fd;
@@ -368,7 +368,7 @@ void print_deps(void)
        close(fd);
 }
 
-void traps(void)
+static void traps(void)
 {
        static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
        int *p = (int *)test;
index 3299ad7fc8c0faae87debf0860d155dbae5d7b83..2ef5d3f666b87ed52c7664cbc37ffe1e143397e8 100644 (file)
@@ -21,7 +21,7 @@ static void usage(void)
  * http://www.cse.yorku.ca/~oz/hash.html
  */
 
-unsigned int djb2_hash(char *str)
+static unsigned int djb2_hash(char *str)
 {
        unsigned long hash = 5381;
        int c;
@@ -34,7 +34,7 @@ unsigned int djb2_hash(char *str)
        return (unsigned int)(hash & ((1 << DYNAMIC_DEBUG_HASH_BITS) - 1));
 }
 
-unsigned int r5_hash(char *str)
+static unsigned int r5_hash(char *str)
 {
        unsigned long hash = 0;
        int c;
index 8e6b716c191c67a1b0668caf43a8bf777b271299..676ddc07d6fa76b1a79603cf3be95a26eb7b7ec1 100755 (executable)
@@ -1,24 +1,85 @@
 #!/usr/bin/perl
 #
-# checkincludes: Find files included more than once in (other) files.
+# checkincludes: find/remove files included more than once
+#
 # Copyright abandoned, 2000, Niels Kristian Bech Jensen <nkbj@image.dk>.
+# Copyright 2009 Luis R. Rodriguez <mcgrof@gmail.com>
+#
+# This script checks for duplicate includes. It also has support
+# to remove them in place. Note that this will not take into
+# consideration macros so you should run this only if you know
+# you do have real dups and do not have them under #ifdef's. You
+# could also just review the results.
+
+sub usage {
+       print "Usage: checkincludes.pl [-r]\n";
+       print "By default we just warn of duplicates\n";
+       print "To remove duplicated includes in place use -r\n";
+       exit 1;
+}
+
+my $remove = 0;
+
+if ($#ARGV < 0) {
+       usage();
+}
+
+if ($#ARGV >= 1) {
+       if ($ARGV[0] =~ /^-/) {
+               if ($ARGV[0] eq "-r") {
+                       $remove = 1;
+                       shift;
+               } else {
+                       usage();
+               }
+       }
+}
 
 foreach $file (@ARGV) {
        open(FILE, $file) or die "Cannot open $file: $!.\n";
 
        my %includedfiles = ();
+       my @file_lines = ();
 
        while (<FILE>) {
                if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
                        ++$includedfiles{$1};
                }
+               push(@file_lines, $_);
        }
-       
-       foreach $filename (keys %includedfiles) {
-               if ($includedfiles{$filename} > 1) {
-                       print "$file: $filename is included more than once.\n";
+
+       close(FILE);
+
+       if (!$remove) {
+               foreach $filename (keys %includedfiles) {
+                       if ($includedfiles{$filename} > 1) {
+                               print "$file: $filename is included more than once.\n";
+                       }
                }
+               next;
        }
 
+       open(FILE,">$file") || die("Cannot write to $file: $!");
+
+       my $dups = 0;
+       foreach (@file_lines) {
+               if (m/^\s*#\s*include\s*[<"](\S*)[>"]/o) {
+                       foreach $filename (keys %includedfiles) {
+                               if ($1 eq $filename) {
+                                       if ($includedfiles{$filename} > 1) {
+                                               $includedfiles{$filename}--;
+                                               $dups++;
+                                       } else {
+                                               print FILE $_;
+                                       }
+                               }
+                       }
+               } else {
+                       print FILE $_;
+               }
+       }
+       if ($dups > 0) {
+               print "$file: removed $dups duplicate includes\n";
+       }
        close(FILE);
 }
index 3baaaecd6b13ef3ba684f8e5320cfef10f1f5a4e..9960d1c303f8c2f985a1a92de8e990850c33ccf6 100644 (file)
@@ -38,14 +38,14 @@ static int conf_cnt;
 static char line[128];
 static struct menu *rootEntry;
 
-static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
-
-static const char *get_help(struct menu *menu)
+static void print_help(struct menu *menu)
 {
-       if (menu_has_help(menu))
-               return _(menu_get_help(menu));
-       else
-               return nohelp_text;
+       struct gstr help = str_new();
+
+       menu_get_ext_help(menu, &help);
+
+       printf("\n%s\n", str_get(&help));
+       str_free(&help);
 }
 
 static void strip(char *str)
@@ -121,7 +121,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
        return 1;
 }
 
-int conf_string(struct menu *menu)
+static int conf_string(struct menu *menu)
 {
        struct symbol *sym = menu->sym;
        const char *def;
@@ -140,7 +140,7 @@ int conf_string(struct menu *menu)
                case '?':
                        /* print help */
                        if (line[1] == '\n') {
-                               printf("\n%s\n", get_help(menu));
+                               print_help(menu);
                                def = NULL;
                                break;
                        }
@@ -220,7 +220,7 @@ static int conf_sym(struct menu *menu)
                if (sym_set_tristate_value(sym, newval))
                        return 0;
 help:
-               printf("\n%s\n", get_help(menu));
+               print_help(menu);
        }
 }
 
@@ -307,7 +307,7 @@ static int conf_choice(struct menu *menu)
                        fgets(line, 128, stdin);
                        strip(line);
                        if (line[0] == '?') {
-                               printf("\n%s\n", get_help(menu));
+                               print_help(menu);
                                continue;
                        }
                        if (!line[0])
@@ -331,7 +331,7 @@ static int conf_choice(struct menu *menu)
                if (!child)
                        continue;
                if (line[strlen(line) - 1] == '?') {
-                       printf("\n%s\n", get_help(child));
+                       print_help(child);
                        continue;
                }
                sym_set_choice_value(sym, child->sym);
index a04da3459f0fa17ee71e155bcdb56d71a27d71b5..b55e72ff2fc676d4ae36ebe9028c6dee5b44d715 100644 (file)
@@ -560,7 +560,7 @@ int conf_write(const char *name)
        return 0;
 }
 
-int conf_split_config(void)
+static int conf_split_config(void)
 {
        const char *name;
        char path[128];
index 579ece4fa584506a882e9e2bdd3e7fbb28d3b0c1..edd3f39a080a422175bf512c94dd1d5bf87e059b 100644 (file)
@@ -348,7 +348,7 @@ struct expr *expr_trans_bool(struct expr *e)
 /*
  * e1 || e2 -> ?
  */
-struct expr *expr_join_or(struct expr *e1, struct expr *e2)
+static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
 {
        struct expr *tmp;
        struct symbol *sym1, *sym2;
@@ -412,7 +412,7 @@ struct expr *expr_join_or(struct expr *e1, struct expr *e2)
        return NULL;
 }
 
-struct expr *expr_join_and(struct expr *e1, struct expr *e2)
+static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
 {
        struct expr *tmp;
        struct symbol *sym1, *sym2;
@@ -1098,6 +1098,8 @@ void expr_fprint(struct expr *e, FILE *out)
 static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
 {
        str_append((struct gstr*)data, str);
+       if (sym)
+               str_printf((struct gstr*)data, " [=%s]", sym_get_string_value(sym));
 }
 
 void expr_gstr_print(struct expr *e, struct gstr *gs)
index 199b22bb49e2a7940bae8f84e38348e6aca30480..65464366fe389ab67e631c64646717c67303d05b 100644 (file)
@@ -456,19 +456,9 @@ static void text_insert_help(struct menu *menu)
        GtkTextBuffer *buffer;
        GtkTextIter start, end;
        const char *prompt = _(menu_get_prompt(menu));
-       gchar *name;
-       const char *help;
+       struct gstr help = str_new();
 
-       help = menu_get_help(menu);
-
-       /* Gettextize if the help text not empty */
-       if ((help != 0) && (help[0] != 0))
-               help = _(help);
-
-       if (menu->sym && menu->sym->name)
-               name = g_strdup_printf(menu->sym->name);
-       else
-               name = g_strdup("");
+       menu_get_ext_help(menu, &help);
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
        gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -478,14 +468,11 @@ static void text_insert_help(struct menu *menu)
        gtk_text_buffer_get_end_iter(buffer, &end);
        gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
                                         NULL);
-       gtk_text_buffer_insert_at_cursor(buffer, " ", 1);
-       gtk_text_buffer_get_end_iter(buffer, &end);
-       gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1,
-                                        NULL);
        gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
        gtk_text_buffer_get_end_iter(buffer, &end);
-       gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2,
+       gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
                                         NULL);
+       str_free(&help);
 }
 
 
index 803233fdd6ddbca62e255beb8db64b743553863e..b1c86c19292cb01d43b8637acddcf701bf93d844 100644 (file)
                  <property name="headers_visible">True</property>
                  <property name="rules_hint">False</property>
                  <property name="reorderable">False</property>
-                 <property name="enable_search">True</property>
+                 <property name="enable_search">False</property>
                  <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
                  <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
                  <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
                      <property name="headers_visible">True</property>
                      <property name="rules_hint">False</property>
                      <property name="reorderable">False</property>
-                     <property name="enable_search">True</property>
+                     <property name="enable_search">False</property>
                      <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
                      <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
                      <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
index 8d9ce22b0fc5d285ca93702d97a437aa7026f364..dcc3fcc0cc9a3d63989932ea1e5139200544fd75 100644 (file)
@@ -166,7 +166,7 @@ static int message__add(const char *msg, char *option, char *file, int lineno)
        return rc;
 }
 
-void menu_build_message_list(struct menu *menu)
+static void menu_build_message_list(struct menu *menu)
 {
        struct menu *child;
 
@@ -211,7 +211,7 @@ static void message__print_gettext_msgid_msgstr(struct message *self)
               "msgstr \"\"\n", self->msg);
 }
 
-void menu__xgettext(void)
+static void menu__xgettext(void)
 {
        struct message *m = message__list;
 
index 8e69461313d19de2c133479154c123e479f059e0..ffeb532b2cff3a71705693f132dc5a5eb9d94bf4 100644 (file)
@@ -17,6 +17,8 @@ P(menu_get_root_menu,struct menu *,(struct menu *menu));
 P(menu_get_parent_menu,struct menu *,(struct menu *menu));
 P(menu_has_help,bool,(struct menu *menu));
 P(menu_get_help,const char *,(struct menu *menu));
+P(get_symbol_str,void,(struct gstr *r, struct symbol *sym));
+P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
 
 /* symbol.c */
 P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
index 25b60bc117f738fabc26efb9a2e8f4f7546cd8d1..d82953573588c4f0c0014cc5c3677e5de4dcded9 100644 (file)
@@ -199,8 +199,6 @@ inputbox_instructions_string[] = N_(
 setmod_text[] = N_(
        "This feature depends on another which has been configured as a module.\n"
        "As a result, this feature will be built as a module."),
-nohelp_text[] = N_(
-       "There is no help available for this kernel option.\n"),
 load_config_text[] = N_(
        "Enter the name of the configuration file you wish to load.  "
        "Accept the name shown to restore the configuration you "
@@ -284,66 +282,6 @@ static void show_textbox(const char *title, const char *text, int r, int c);
 static void show_helptext(const char *title, const char *text);
 static void show_help(struct menu *menu);
 
-static void get_prompt_str(struct gstr *r, struct property *prop)
-{
-       int i, j;
-       struct menu *submenu[8], *menu;
-
-       str_printf(r, _("Prompt: %s\n"), _(prop->text));
-       str_printf(r, _("  Defined at %s:%d\n"), prop->menu->file->name,
-               prop->menu->lineno);
-       if (!expr_is_yes(prop->visible.expr)) {
-               str_append(r, _("  Depends on: "));
-               expr_gstr_print(prop->visible.expr, r);
-               str_append(r, "\n");
-       }
-       menu = prop->menu->parent;
-       for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
-               submenu[i++] = menu;
-       if (i > 0) {
-               str_printf(r, _("  Location:\n"));
-               for (j = 4; --i >= 0; j += 2) {
-                       menu = submenu[i];
-                       str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
-                       if (menu->sym) {
-                               str_printf(r, " (%s [=%s])", menu->sym->name ?
-                                       menu->sym->name : _("<choice>"),
-                                       sym_get_string_value(menu->sym));
-                       }
-                       str_append(r, "\n");
-               }
-       }
-}
-
-static void get_symbol_str(struct gstr *r, struct symbol *sym)
-{
-       bool hit;
-       struct property *prop;
-
-       if (sym && sym->name)
-               str_printf(r, "Symbol: %s [=%s]\n", sym->name,
-                                                   sym_get_string_value(sym));
-       for_all_prompts(sym, prop)
-               get_prompt_str(r, prop);
-       hit = false;
-       for_all_properties(sym, prop, P_SELECT) {
-               if (!hit) {
-                       str_append(r, "  Selects: ");
-                       hit = true;
-               } else
-                       str_printf(r, " && ");
-               expr_gstr_print(prop->expr, r);
-       }
-       if (hit)
-               str_append(r, "\n");
-       if (sym->rev_dep.expr) {
-               str_append(r, _("  Selected by: "));
-               expr_gstr_print(sym->rev_dep.expr, r);
-               str_append(r, "\n");
-       }
-       str_append(r, "\n\n");
-}
-
 static struct gstr get_relations_str(struct symbol **sym_arr)
 {
        struct symbol *sym;
@@ -699,19 +637,9 @@ static void show_helptext(const char *title, const char *text)
 static void show_help(struct menu *menu)
 {
        struct gstr help = str_new();
-       struct symbol *sym = menu->sym;
-
-       if (menu_has_help(menu))
-       {
-               if (sym->name) {
-                       str_printf(&help, "CONFIG_%s:\n\n", sym->name);
-                       str_append(&help, _(menu_get_help(menu)));
-                       str_append(&help, "\n");
-               }
-       } else {
-               str_append(&help, nohelp_text);
-       }
-       get_symbol_str(&help, sym);
+
+       menu_get_ext_help(menu, &help);
+
        show_helptext(_(menu_get_prompt(menu)), str_get(&help));
        str_free(&help);
 }
index 07ff8d105c9def5885221d8668a4c7859b3bbb29..059a2465c5744ffed6d3cff25e2d8135a16c0399 100644 (file)
@@ -9,6 +9,9 @@
 #define LKC_DIRECT_LINK
 #include "lkc.h"
 
+static const char nohelp_text[] = N_(
+       "There is no help available for this kernel option.\n");
+
 struct menu rootmenu;
 static struct menu **last_entry_ptr;
 
@@ -74,7 +77,7 @@ void menu_end_menu(void)
        current_menu = current_menu->parent;
 }
 
-struct expr *menu_check_dep(struct expr *e)
+static struct expr *menu_check_dep(struct expr *e)
 {
        if (!e)
                return e;
@@ -184,7 +187,7 @@ static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
               (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name));
 }
 
-void sym_check_prop(struct symbol *sym)
+static void sym_check_prop(struct symbol *sym)
 {
        struct property *prop;
        struct symbol *sym2;
@@ -451,3 +454,80 @@ const char *menu_get_help(struct menu *menu)
        else
                return "";
 }
+
+static void get_prompt_str(struct gstr *r, struct property *prop)
+{
+       int i, j;
+       struct menu *submenu[8], *menu;
+
+       str_printf(r, _("Prompt: %s\n"), _(prop->text));
+       str_printf(r, _("  Defined at %s:%d\n"), prop->menu->file->name,
+               prop->menu->lineno);
+       if (!expr_is_yes(prop->visible.expr)) {
+               str_append(r, _("  Depends on: "));
+               expr_gstr_print(prop->visible.expr, r);
+               str_append(r, "\n");
+       }
+       menu = prop->menu->parent;
+       for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
+               submenu[i++] = menu;
+       if (i > 0) {
+               str_printf(r, _("  Location:\n"));
+               for (j = 4; --i >= 0; j += 2) {
+                       menu = submenu[i];
+                       str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
+                       if (menu->sym) {
+                               str_printf(r, " (%s [=%s])", menu->sym->name ?
+                                       menu->sym->name : _("<choice>"),
+                                       sym_get_string_value(menu->sym));
+                       }
+                       str_append(r, "\n");
+               }
+       }
+}
+
+void get_symbol_str(struct gstr *r, struct symbol *sym)
+{
+       bool hit;
+       struct property *prop;
+
+       if (sym && sym->name)
+               str_printf(r, "Symbol: %s [=%s]\n", sym->name,
+                          sym_get_string_value(sym));
+       for_all_prompts(sym, prop)
+               get_prompt_str(r, prop);
+       hit = false;
+       for_all_properties(sym, prop, P_SELECT) {
+               if (!hit) {
+                       str_append(r, "  Selects: ");
+                       hit = true;
+               } else
+                       str_printf(r, " && ");
+               expr_gstr_print(prop->expr, r);
+       }
+       if (hit)
+               str_append(r, "\n");
+       if (sym->rev_dep.expr) {
+               str_append(r, _("  Selected by: "));
+               expr_gstr_print(sym->rev_dep.expr, r);
+               str_append(r, "\n");
+       }
+       str_append(r, "\n\n");
+}
+
+void menu_get_ext_help(struct menu *menu, struct gstr *help)
+{
+       struct symbol *sym = menu->sym;
+
+       if (menu_has_help(menu)) {
+               if (sym->name) {
+                       str_printf(help, "CONFIG_%s:\n\n", sym->name);
+                       str_append(help, _(menu_get_help(menu)));
+                       str_append(help, "\n");
+               }
+       } else {
+               str_append(help, nohelp_text);
+       }
+       if (sym)
+               get_symbol_str(help, sym);
+}
index ce7d508c75200b1072bb40c96e72701f742a6ddc..00c51507cfcc44acfe434fc35e08827c14ff7f0d 100644 (file)
@@ -1042,12 +1042,10 @@ void ConfigInfoView::menuInfo(void)
                if (showDebug())
                        debug = debug_info(sym);
 
-               help = menu_get_help(menu);
-               /* Gettextize if the help text not empty */
-               if (help.isEmpty())
-                       help = print_filter(menu_get_help(menu));
-               else
-                       help = print_filter(_(menu_get_help(menu)));
+               struct gstr help_gstr = str_new();
+               menu_get_ext_help(menu, &help_gstr);
+               help = print_filter(str_get(&help_gstr));
+               str_free(&help_gstr);
        } else if (menu->prompt) {
                head += "<big><b>";
                head += print_filter(_(menu->prompt->text));
index 18f3e5c33634f7729a9ad757e638757649bb043d..6c8fbbb66ebcaddefff183696d1c5d89bc2d6c09 100644 (file)
@@ -36,7 +36,7 @@ tristate modules_val;
 
 struct expr *sym_env_list;
 
-void sym_add_default(struct symbol *sym, const char *def)
+static void sym_add_default(struct symbol *sym, const char *def)
 {
        struct property *prop = prop_alloc(P_DEFAULT, sym);
 
@@ -125,7 +125,7 @@ struct property *sym_get_default_prop(struct symbol *sym)
        return NULL;
 }
 
-struct property *sym_get_range_prop(struct symbol *sym)
+static struct property *sym_get_range_prop(struct symbol *sym)
 {
        struct property *prop;
 
@@ -943,7 +943,7 @@ const char *prop_get_type_name(enum prop_type type)
        return "unknown";
 }
 
-void prop_add_env(const char *env)
+static void prop_add_env(const char *env)
 {
        struct symbol *sym, *sym2;
        struct property *prop;
index 89774011965d7f17289b09af086c1651e9cf7ef1..5f0fcb712e2992229eeb3606a3e425bcf4115218 100644 (file)
@@ -184,10 +184,7 @@ if ($target eq "0") {
 
 # if it's a module, we need to find the .ko file and calculate a load offset
 if ($module ne "") {
-       my $dir = dirname($filename);
-       $dir = $dir . "/";
-       my $mod = $module . ".ko";
-       my $modulefile = `find $dir -name $mod | head -1`;
+       my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
        chomp($modulefile);
        $filename = $modulefile;
        if ($filename eq "") {
index 4a34ec591e8c05f224f4900028f0e25f99e9eeba..d52f7a01557c1b28cf3155a640c175ce613558aa 100755 (executable)
@@ -101,7 +101,8 @@ exuberant()
        -I ____cacheline_aligned_in_smp                         \
        -I ____cacheline_internodealigned_in_smp                \
        -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL                      \
-       --extra=+f --c-kinds=+px                                \
+       -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
+       --extra=+f --c-kinds=-px                                \
        --regex-asm='/^ENTRY\(([^)]*)\).*/\1/'                  \
        --regex-c='/^SYSCALL_DEFINE[[:digit:]]?\(([^,)]*).*/sys_\1/'
 
index 69b2e89fa1653d4b25b2e89563f6e2b7b59bd4e2..8e48117a3f3dc763a0d18f69db0a23f9acafe632 100644 (file)
@@ -4,5 +4,7 @@
 gen_init_cpio
 initramfs_data.cpio
 initramfs_data.cpio.gz
+initramfs_data.cpio.bz2
+initramfs_data.cpio.lzma
 initramfs_list
 include
index 245145a99c1012fa4b0f5f5d9d83a4f1f50dd0bc..1e6a9e4a72cc627fb4d0e4863dabdbc15f709274 100644 (file)
@@ -6,7 +6,7 @@ klibcdirs:;
 PHONY += klibcdirs
 
 
-# Gzip, but no bzip2
+# Gzip
 suffix_$(CONFIG_INITRAMFS_COMPRESSION_GZIP)   = .gz
 
 # Bzip2