kernel: use -ffunction-sections, -fdata-sections and --gc-sections on mips
authorFelix Fietkau <nbd@openwrt.org>
Sat, 26 Jan 2013 16:26:13 +0000 (16:26 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 26 Jan 2013 16:26:13 +0000 (16:26 +0000)
in combination with kernel symbol export stripping this significantly reduces
the kernel image size

SVN-Revision: 35320

54 files changed:
include/kernel-build.mk
target/linux/ar71xx/patches-3.7/169-MIPS-ath79-allow-to-specify-bus-number-in-PCI-IRQ-ma.patch
target/linux/ar71xx/patches-3.7/170-MIPS-ath79-add-PCI-controller-registration-code-for-.patch
target/linux/ar71xx/patches-3.7/203-spi-ath79-use-gpio_request_one.patch
target/linux/ar71xx/patches-3.7/204-spi-ath79-avoid-multiple-initialization-of-the-SPI-c.patch
target/linux/ar71xx/patches-3.7/206-spi-ath79-make-chipselect-logic-more-flexible.patch
target/linux/ar71xx/patches-3.7/212-MIPS-ath79-fix-GPIO-function-selection-for-AR934x-So.patch
target/linux/ar71xx/patches-3.7/500-MIPS-fw-myloader.patch
target/linux/ar71xx/patches-3.7/505-MIPS-ath79-add-ath79_gpio_function_select.patch
target/linux/ar71xx/patches-3.7/521-MIPS-ath79-enable-UART-for-early_serial.patch
target/linux/ar71xx/patches-3.7/606-MIPS-ath79-pb44-fixes.patch
target/linux/ar71xx/patches-3.7/902-unaligned_access_hacks.patch
target/linux/generic/patches-3.7/220-gc_sections.patch [new file with mode: 0644]
target/linux/generic/patches-3.7/220-module_exports.patch [deleted file]
target/linux/generic/patches-3.7/221-module_exports.patch [new file with mode: 0644]
target/linux/generic/patches-3.7/230-openwrt_lzma_options.patch
target/linux/generic/patches-3.7/302-mips_no_branch_likely.patch
target/linux/generic/patches-3.7/305-mips_module_reloc.patch
target/linux/generic/patches-3.7/306-mips_mem_functions_performance.patch
target/linux/generic/patches-3.7/340-module_alloc_size_check.patch
target/linux/generic/patches-3.7/504-yaffs-Mods-for-Linux-3.0-and-fix-a-typo.patch
target/linux/generic/patches-3.7/512-yaffs-3.5-convert-to-use-kuid_t-kgid_t.patch
target/linux/generic/patches-3.7/531-debloat_lzma.patch
target/linux/generic/patches-3.7/600-netfilter_layer7_2.22.patch
target/linux/generic/patches-3.7/610-netfilter_match_bypass_default_checks.patch
target/linux/generic/patches-3.7/653-disable_netlink_trim.patch
target/linux/generic/patches-3.7/750-hostap_txpower.patch
target/linux/generic/patches-3.7/901-debloat_sock_diag.patch
target/linux/generic/patches-3.7/941-ocf_20120127.patch
target/linux/generic/patches-3.7/992-mpcore_wdt_fix_watchdog_counter_loading.patch
target/linux/generic/patches-3.8/100-overlayfs.patch
target/linux/generic/patches-3.8/102-ehci_hcd_ignore_oc.patch
target/linux/generic/patches-3.8/220-gc_sections.patch [new file with mode: 0644]
target/linux/generic/patches-3.8/220-module_exports.patch [deleted file]
target/linux/generic/patches-3.8/221-module_exports.patch [new file with mode: 0644]
target/linux/generic/patches-3.8/230-openwrt_lzma_options.patch
target/linux/generic/patches-3.8/302-mips_no_branch_likely.patch
target/linux/generic/patches-3.8/305-mips_module_reloc.patch
target/linux/generic/patches-3.8/306-mips_mem_functions_performance.patch
target/linux/generic/patches-3.8/470-mtd_m25p80_add_pm25lv_flash_support.patch
target/linux/generic/patches-3.8/476-mtd-m25p80-allow-to-disable-small-sector-erase.patch
target/linux/generic/patches-3.8/504-yaffs-Mods-for-Linux-3.0-and-fix-a-typo.patch
target/linux/generic/patches-3.8/512-yaffs-3.5-convert-to-use-kuid_t-kgid_t.patch
target/linux/generic/patches-3.8/531-debloat_lzma.patch
target/linux/generic/patches-3.8/600-netfilter_layer7_2.22.patch
target/linux/generic/patches-3.8/610-netfilter_match_bypass_default_checks.patch
target/linux/generic/patches-3.8/653-disable_netlink_trim.patch
target/linux/generic/patches-3.8/750-hostap_txpower.patch
target/linux/generic/patches-3.8/810-pci_disable_common_quirks.patch
target/linux/generic/patches-3.8/901-debloat_sock_diag.patch
target/linux/generic/patches-3.8/920-unable_to_open_console.patch
target/linux/generic/patches-3.8/941-ocf_20120127.patch
target/linux/generic/patches-3.8/950-vm_exports.patch
target/linux/generic/patches-3.8/992-mpcore_wdt_fix_watchdog_counter_loading.patch

index 0b7b54fdd8797ff60fd171f8dc96630a26c4ea0d..095940c570edcee656da749c8993b815b552c649 100644 (file)
@@ -81,15 +81,11 @@ define BuildKernel
        ( \
                echo '#define SYMTAB_KEEP \'; \
                cat $(KERNEL_BUILD_DIR)/sym_include.txt | \
-                       awk '{print "*(___ksymtab+" $$$$1 ") \\" }'; \
+                       awk '{print "KEEP(*(___ksymtab+" $$$$1 ")) \\" }'; \
                echo; \
                echo '#define SYMTAB_KEEP_GPL \'; \
                cat $(KERNEL_BUILD_DIR)/sym_include.txt | \
-                       awk '{print "*(___ksymtab_gpl+" $$$$1 ") \\" }'; \
-               echo; \
-               echo '#define SYMTAB_KEEP_STR \'; \
-               cat $(KERNEL_BUILD_DIR)/sym_include.txt | \
-                       awk '{print "*(__ksymtab_strings." $$$$1 ") \\" }'; \
+                       awk '{print "KEEP(*(___ksymtab_gpl+" $$$$1 ")) \\" }'; \
                echo; \
                echo '#define SYMTAB_DISCARD \'; \
                cat $(KERNEL_BUILD_DIR)/sym_exclude.txt | \
@@ -99,10 +95,6 @@ define BuildKernel
                cat $(KERNEL_BUILD_DIR)/sym_exclude.txt | \
                        awk '{print "*(___ksymtab_gpl+" $$$$1 ") \\" }'; \
                echo; \
-               echo '#define SYMTAB_DISCARD_STR \'; \
-               cat $(KERNEL_BUILD_DIR)/sym_exclude.txt | \
-                       awk '{print "*(__ksymtab_strings." $$$$1 ") \\" }'; \
-               echo; \
        ) > $$@
 
   $(STAMP_CONFIGURED): $(STAMP_PREPARED) $(LINUX_KCONFIG_LIST) $(TOPDIR)/.config
index bd95d718b2c1e271fde250818e51da357db7a500..89ab5ace6958950b95c58cf1733d33b277092fbf 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/arch/mips/ath79/pci.c
 +++ b/arch/mips/ath79/pci.c
-@@ -75,7 +75,9 @@ int __init pcibios_map_irq(const struct
+@@ -75,7 +75,9 @@ int __init pcibios_map_irq(const struct 
                const struct ath79_pci_irq *entry;
  
                entry = &ath79_pci_irq_map[i];
index 0c3889fdb9892cc3c3dddc19987137089c71ec7f..5c6388c455b18c5ac74eb054da4b6fa58b6149d8 100644 (file)
@@ -44,7 +44,7 @@ Subject: [PATCH 26/34] MIPS: ath79: add PCI controller registration code for the
  int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
  {
        int irq = -1;
-@@ -64,6 +79,9 @@ int __init pcibios_map_irq(const struct
+@@ -64,6 +79,9 @@ int __init pcibios_map_irq(const struct 
                           soc_is_ar9344()) {
                        ath79_pci_irq_map = ar724x_pci_irq_map;
                        ath79_pci_nr_irqs = ARRAY_SIZE(ar724x_pci_irq_map);
index 12559bcae1cda8c3e39f2ca4b675766e098122f8..a7329b2ab79291dad1ececaf4f4d9b6926cdc689 100644 (file)
@@ -32,19 +32,18 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 -              status = gpio_request(cdata->gpio, dev_name(&spi->dev));
 -              if (status)
 -                      return status;
--
++              flags = GPIOF_DIR_OUT;
++              if (spi->mode & SPI_CS_HIGH)
++                      flags |= GPIOF_INIT_HIGH;
++              else
++                      flags |= GPIOF_INIT_LOW;
 -              status = gpio_direction_output(cdata->gpio,
 -                                             spi->mode & SPI_CS_HIGH);
 -              if (status) {
 -                      gpio_free(cdata->gpio);
 -                      return status;
 -              }
-+              flags = GPIOF_DIR_OUT;
-+              if (spi->mode & SPI_CS_HIGH)
-+                      flags |= GPIOF_INIT_HIGH;
-+              else
-+                      flags |= GPIOF_INIT_LOW;
-+
 +              status = gpio_request_one(cdata->gpio, flags,
 +                                        dev_name(&spi->dev));
        }
index c6f4b2b95960ca76a9f2becc52d071feb8a0ef4d..976159c6f9ba777867b2a07b1f9c81bac959e0bb 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/spi/spi-ath79.c
 +++ b/drivers/spi/spi-ath79.c
-@@ -96,16 +96,8 @@ static void ath79_spi_chipselect(struct
+@@ -96,16 +96,8 @@ static void ath79_spi_chipselect(struct 
  
  }
  
index 34df1756bbce82e3f6b9f10683cc27256e928f6e..da83e2ebe8508f7c81f78ebf076d7548f28b58b1 100644 (file)
@@ -170,7 +170,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  struct ath79_spi {
        struct spi_bitbang      bitbang;
        u32                     ioc_base;
-@@ -69,6 +71,7 @@ static void ath79_spi_chipselect(struct
+@@ -69,6 +71,7 @@ static void ath79_spi_chipselect(struct 
  {
        struct ath79_spi *sp = ath79_spidev_to_sp(spi);
        int cs_high = (spi->mode & SPI_CS_HIGH) ? is_active : !is_active;
@@ -178,7 +178,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
        if (is_active) {
                /* set initial clock polarity */
-@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct
+@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct 
                ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
        }
  
index a9845baba8f6655d0056308f54128cb9782228aa..3e41789bf8776d65e537072b48d7c5980c6d272a 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/arch/mips/ath79/gpio.c
 +++ b/arch/mips/ath79/gpio.c
-@@ -137,47 +137,61 @@ static struct gpio_chip ath79_gpio_chip
+@@ -137,47 +137,61 @@ static struct gpio_chip ath79_gpio_chip 
        .base                   = 0,
  };
  
index 3559a27a2ce3be04b643334f0e966467cdf95ea5..184f67a72374191c78a3f37b25fc37c67ba22e41 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/Makefile
 +++ b/arch/mips/Makefile
-@@ -180,6 +180,7 @@ endif
+@@ -182,6 +182,7 @@ endif
  #
  libs-$(CONFIG_ARC)            += arch/mips/fw/arc/
  libs-$(CONFIG_CFE)            += arch/mips/fw/cfe/
index 86e136f67ec3730a4468843ef57a52f534ade544..08f4a1e95cb05612313231f39468e66f883ecbf2 100644 (file)
@@ -10,7 +10,7 @@
  #endif /* __ATH79_COMMON_H */
 --- a/arch/mips/ath79/gpio.c
 +++ b/arch/mips/ath79/gpio.c
-@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set,
+@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set, 
        spin_unlock_irqrestore(&ath79_gpio_lock, flags);
  }
  
index 489bc967380cb89bb7826d1d05e78fbfe814d16e..2ee025bbf2079fa3ad73fa013991b52a62c32511 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/early_printk.c
 +++ b/arch/mips/ath79/early_printk.c
-@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
+@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned 
        /* nothing to do */
  }
  
index f9ec7753f1aa75c5be2321bd071253217c37f24a..b38b46121ded4083fe63eae2241156d7f7c32eab 100644 (file)
@@ -50,7 +50,7 @@
  #define PB44_GPIO_SW_RESET    (PB44_GPIO_EXP_BASE + 6)
  #define PB44_GPIO_SW_JUMP     (PB44_GPIO_EXP_BASE + 8)
  #define PB44_GPIO_LED_JUMP1   (PB44_GPIO_EXP_BASE + 9)
-@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
+@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data 
        .cs_line = 0,
  };
  
index e7e1712b7ee2d33b4b81703b5f2b20364293f261..fc05676b83491e7e0f2148fb6d0769ef1a426530 100644 (file)
  #include <asm/uaccess.h>
  
  #include <linux/proc_fs.h>
-@@ -851,10 +852,10 @@ static void tcp_v6_send_response(struct
+@@ -851,10 +852,10 @@ static void tcp_v6_send_response(struct 
        topt = (__be32 *)(t1 + 1);
  
        if (ts) {
        if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
                fl6.flowi6_mark = skb->mark;
  
-@@ -1256,7 +1256,7 @@ static int ip6gre_header(struct sk_buff
+@@ -1256,7 +1256,7 @@ static int ip6gre_header(struct sk_buff 
        struct ipv6hdr *ipv6h = (struct ipv6hdr *)skb_push(skb, t->hlen);
        __be16 *p = (__be16 *)(ipv6h+1);
  
diff --git a/target/linux/generic/patches-3.7/220-gc_sections.patch b/target/linux/generic/patches-3.7/220-gc_sections.patch
new file mode 100644 (file)
index 0000000..8a52a1e
--- /dev/null
@@ -0,0 +1,372 @@
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -89,10 +89,12 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
+ #
+ cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe
+ cflags-y                      += -msoft-float
+-LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
++LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections
+ KBUILD_AFLAGS_MODULE          += -mlong-calls
+ KBUILD_CFLAGS_MODULE          += -mlong-calls
++KBUILD_CFLAGS_KERNEL          += -ffunction-sections -fdata-sections
++
+ cflags-y += -ffreestanding
+ #
+--- a/arch/mips/kernel/vmlinux.lds.S
++++ b/arch/mips/kernel/vmlinux.lds.S
+@@ -66,7 +66,7 @@ SECTIONS
+       /* Exception table for data bus errors */
+       __dbe_table : {
+               __start___dbe_table = .;
+-              *(__dbe_table)
++              KEEP(*(__dbe_table))
+               __stop___dbe_table = .;
+       }
+@@ -111,7 +111,7 @@ SECTIONS
+       . = ALIGN(4);
+       .mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
+               __mips_machines_start = .;
+-              *(.mips.machines.init)
++              KEEP(*(.mips.machines.init))
+               __mips_machines_end = .;
+       }
+--- a/include/asm-generic/vmlinux.lds.h
++++ b/include/asm-generic/vmlinux.lds.h
+@@ -101,7 +101,7 @@
+ #ifdef CONFIG_FTRACE_MCOUNT_RECORD
+ #define MCOUNT_REC()  . = ALIGN(8);                           \
+                       VMLINUX_SYMBOL(__start_mcount_loc) = .; \
+-                      *(__mcount_loc)                         \
++                      KEEP(*(__mcount_loc))                   \
+                       VMLINUX_SYMBOL(__stop_mcount_loc) = .;
+ #else
+ #define MCOUNT_REC()
+@@ -109,7 +109,7 @@
+ #ifdef CONFIG_TRACE_BRANCH_PROFILING
+ #define LIKELY_PROFILE()      VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
+-                              *(_ftrace_annotated_branch)                           \
++                              KEEP(*(_ftrace_annotated_branch))                     \
+                               VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
+ #else
+ #define LIKELY_PROFILE()
+@@ -117,7 +117,7 @@
+ #ifdef CONFIG_PROFILE_ALL_BRANCHES
+ #define BRANCH_PROFILE()      VMLINUX_SYMBOL(__start_branch_profile) = .;   \
+-                              *(_ftrace_branch)                             \
++                              KEEP(*(_ftrace_branch))                       \
+                               VMLINUX_SYMBOL(__stop_branch_profile) = .;
+ #else
+ #define BRANCH_PROFILE()
+@@ -126,7 +126,7 @@
+ #ifdef CONFIG_EVENT_TRACING
+ #define FTRACE_EVENTS()       . = ALIGN(8);                                   \
+                       VMLINUX_SYMBOL(__start_ftrace_events) = .;      \
+-                      *(_ftrace_events)                               \
++                      KEEP(*(_ftrace_events))                         \
+                       VMLINUX_SYMBOL(__stop_ftrace_events) = .;
+ #else
+ #define FTRACE_EVENTS()
+@@ -134,7 +134,7 @@
+ #ifdef CONFIG_TRACING
+ #define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .;      \
+-                       *(__trace_printk_fmt) /* Trace_printk fmt' pointer */ \
++                       KEEP(*(__trace_printk_fmt)) /* Trace_printk fmt' pointer */ \
+                        VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .;
+ #else
+ #define TRACE_PRINTKS()
+@@ -143,7 +143,7 @@
+ #ifdef CONFIG_FTRACE_SYSCALLS
+ #define TRACE_SYSCALLS() . = ALIGN(8);                                        \
+                        VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
+-                       *(__syscalls_metadata)                         \
++                       KEEP(*(__syscalls_metadata))                   \
+                        VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;
+ #else
+ #define TRACE_SYSCALLS()
+@@ -153,7 +153,7 @@
+ #define KERNEL_DTB()                                                  \
+       STRUCT_ALIGN();                                                 \
+       VMLINUX_SYMBOL(__dtb_start) = .;                                \
+-      *(.dtb.init.rodata)                                             \
++      KEEP(*(.dtb.init.rodata))                                       \
+       VMLINUX_SYMBOL(__dtb_end) = .;
+ /* .data section */
+@@ -173,15 +173,16 @@
+       /* implement dynamic printk debug */                            \
+       . = ALIGN(8);                                                   \
+       VMLINUX_SYMBOL(__start___jump_table) = .;                       \
+-      *(__jump_table)                                                 \
++      KEEP(*(__jump_table))                                           \
+       VMLINUX_SYMBOL(__stop___jump_table) = .;                        \
+       . = ALIGN(8);                                                   \
+       VMLINUX_SYMBOL(__start___verbose) = .;                          \
+-      *(__verbose)                                                    \
++      KEEP(*(__verbose))                                              \
+       VMLINUX_SYMBOL(__stop___verbose) = .;                           \
+       LIKELY_PROFILE()                                                \
+       BRANCH_PROFILE()                                                \
+-      TRACE_PRINTKS()
++      TRACE_PRINTKS()                                                 \
++      *(.data.*)
+ /*
+  * Data section helpers
+@@ -235,39 +236,39 @@
+       /* PCI quirks */                                                \
+       .pci_fixup        : AT(ADDR(.pci_fixup) - LOAD_OFFSET) {        \
+               VMLINUX_SYMBOL(__start_pci_fixups_early) = .;           \
+-              *(.pci_fixup_early)                                     \
++              KEEP(*(.pci_fixup_early))                               \
+               VMLINUX_SYMBOL(__end_pci_fixups_early) = .;             \
+               VMLINUX_SYMBOL(__start_pci_fixups_header) = .;          \
+-              *(.pci_fixup_header)                                    \
++              KEEP(*(.pci_fixup_header))                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_header) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_final) = .;           \
+-              *(.pci_fixup_final)                                     \
++              KEEP(*(.pci_fixup_final))                               \
+               VMLINUX_SYMBOL(__end_pci_fixups_final) = .;             \
+               VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;          \
+-              *(.pci_fixup_enable)                                    \
++              KEEP(*(.pci_fixup_enable))                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;          \
+-              *(.pci_fixup_resume)                                    \
++              KEEP(*(.pci_fixup_resume))                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .;    \
+-              *(.pci_fixup_resume_early)                              \
++              KEEP(*(.pci_fixup_resume_early))                        \
+               VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .;      \
+               VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .;         \
+-              *(.pci_fixup_suspend)                                   \
++              KEEP(*(.pci_fixup_suspend))                             \
+               VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .;           \
+       }                                                               \
+                                                                       \
+       /* Built-in firmware blobs */                                   \
+       .builtin_fw        : AT(ADDR(.builtin_fw) - LOAD_OFFSET) {      \
+               VMLINUX_SYMBOL(__start_builtin_fw) = .;                 \
+-              *(.builtin_fw)                                          \
++              KEEP(*(.builtin_fw))                                    \
+               VMLINUX_SYMBOL(__end_builtin_fw) = .;                   \
+       }                                                               \
+                                                                       \
+       /* RapidIO route ops */                                         \
+       .rio_ops        : AT(ADDR(.rio_ops) - LOAD_OFFSET) {            \
+               VMLINUX_SYMBOL(__start_rio_switch_ops) = .;             \
+-              *(.rio_switch_ops)                                      \
++              KEEP(*(.rio_switch_ops))                                \
+               VMLINUX_SYMBOL(__end_rio_switch_ops) = .;               \
+       }                                                               \
+                                                                       \
+@@ -276,49 +277,49 @@
+       /* Kernel symbol table: Normal symbols */                       \
+       __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
+               VMLINUX_SYMBOL(__start___ksymtab) = .;                  \
+-              *(SORT(___ksymtab+*))                                   \
++              KEEP(*(SORT(___ksymtab+*)))                             \
+               VMLINUX_SYMBOL(__stop___ksymtab) = .;                   \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only symbols */                     \
+       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
+               VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;              \
+-              *(SORT(___ksymtab_gpl+*))                               \
++              KEEP(*(SORT(___ksymtab_gpl+*)))                         \
+               VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;               \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: Normal unused symbols */                \
+       __ksymtab_unused  : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) {  \
+               VMLINUX_SYMBOL(__start___ksymtab_unused) = .;           \
+-              *(SORT(___ksymtab_unused+*))                            \
++              KEEP(*(SORT(___ksymtab_unused+*)))                      \
+               VMLINUX_SYMBOL(__stop___ksymtab_unused) = .;            \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only unused symbols */              \
+       __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .;       \
+-              *(SORT(___ksymtab_unused_gpl+*))                        \
++              KEEP(*(SORT(___ksymtab_unused_gpl+*)))                  \
+               VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .;        \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-future-only symbols */              \
+       __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .;       \
+-              *(SORT(___ksymtab_gpl_future+*))                        \
++              KEEP(*(SORT(___ksymtab_gpl_future+*)))                  \
+               VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .;        \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: Normal symbols */                       \
+       __kcrctab         : AT(ADDR(__kcrctab) - LOAD_OFFSET) {         \
+               VMLINUX_SYMBOL(__start___kcrctab) = .;                  \
+-              *(SORT(___kcrctab+*))                                   \
++              KEEP(*(SORT(___kcrctab+*)))                             \
+               VMLINUX_SYMBOL(__stop___kcrctab) = .;                   \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only symbols */                     \
+       __kcrctab_gpl     : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) {     \
+               VMLINUX_SYMBOL(__start___kcrctab_gpl) = .;              \
+-              *(SORT(___kcrctab_gpl+*))                               \
++              KEEP(*(SORT(___kcrctab_gpl+*)))                         \
+               VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .;               \
+       }                                                               \
+                                                                       \
+@@ -332,14 +333,14 @@
+       /* Kernel symbol table: GPL-only unused symbols */              \
+       __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .;       \
+-              *(SORT(___kcrctab_unused_gpl+*))                        \
++              KEEP(*(SORT(___kcrctab_unused_gpl+*)))                  \
+               VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .;        \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-future-only symbols */              \
+       __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .;       \
+-              *(SORT(___kcrctab_gpl_future+*))                        \
++              KEEP(*(SORT(___kcrctab_gpl_future+*)))                  \
+               VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .;        \
+       }                                                               \
+                                                                       \
+@@ -362,14 +363,14 @@
+       /* Built-in module parameters. */                               \
+       __param : AT(ADDR(__param) - LOAD_OFFSET) {                     \
+               VMLINUX_SYMBOL(__start___param) = .;                    \
+-              *(__param)                                              \
++              KEEP(*(__param))                                        \
+               VMLINUX_SYMBOL(__stop___param) = .;                     \
+       }                                                               \
+                                                                       \
+       /* Built-in module versions. */                                 \
+       __modver : AT(ADDR(__modver) - LOAD_OFFSET) {                   \
+               VMLINUX_SYMBOL(__start___modver) = .;                   \
+-              *(__modver)                                             \
++              KEEP(*(__modver))                                       \
+               VMLINUX_SYMBOL(__stop___modver) = .;                    \
+               . = ALIGN((align));                                     \
+               VMLINUX_SYMBOL(__end_rodata) = .;                       \
+@@ -429,7 +430,7 @@
+ #define ENTRY_TEXT                                                    \
+               ALIGN_FUNCTION();                                       \
+               VMLINUX_SYMBOL(__entry_text_start) = .;                 \
+-              *(.entry.text)                                          \
++              KEEP(*(.entry.text))                                    \
+               VMLINUX_SYMBOL(__entry_text_end) = .;
+ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
+@@ -457,7 +458,7 @@
+       . = ALIGN(align);                                               \
+       __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {               \
+               VMLINUX_SYMBOL(__start___ex_table) = .;                 \
+-              *(__ex_table)                                           \
++              KEEP(*(__ex_table))                                             \
+               VMLINUX_SYMBOL(__stop___ex_table) = .;                  \
+       }
+@@ -473,7 +474,7 @@
+ #ifdef CONFIG_CONSTRUCTORS
+ #define KERNEL_CTORS()        . = ALIGN(8);                      \
+                       VMLINUX_SYMBOL(__ctors_start) = .; \
+-                      *(.ctors)                          \
++                      KEEP(*(.ctors))                    \
+                       VMLINUX_SYMBOL(__ctors_end) = .;
+ #else
+ #define KERNEL_CTORS()
+@@ -526,7 +527,7 @@
+ #define SBSS(sbss_align)                                              \
+       . = ALIGN(sbss_align);                                          \
+       .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) {                         \
+-              *(.sbss)                                                \
++              *(.sbss .sbss.*)                                        \
+               *(.scommon)                                             \
+       }
+@@ -544,7 +545,7 @@
+               BSS_FIRST_SECTIONS                                      \
+               *(.bss..page_aligned)                                   \
+               *(.dynbss)                                              \
+-              *(.bss)                                                 \
++              *(.bss .bss.*)                                          \
+               *(COMMON)                                               \
+       }
+@@ -593,7 +594,7 @@
+       . = ALIGN(8);                                                   \
+       __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) {             \
+               VMLINUX_SYMBOL(__start___bug_table) = .;                \
+-              *(__bug_table)                                          \
++              KEEP(*(__bug_table))                                    \
+               VMLINUX_SYMBOL(__stop___bug_table) = .;                 \
+       }
+ #else
+@@ -605,7 +606,7 @@
+       . = ALIGN(4);                                                   \
+       .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {               \
+               VMLINUX_SYMBOL(__tracedata_start) = .;                  \
+-              *(.tracedata)                                           \
++              KEEP(*(.tracedata))                                     \
+               VMLINUX_SYMBOL(__tracedata_end) = .;                    \
+       }
+ #else
+@@ -622,17 +623,17 @@
+ #define INIT_SETUP(initsetup_align)                                   \
+               . = ALIGN(initsetup_align);                             \
+               VMLINUX_SYMBOL(__setup_start) = .;                      \
+-              *(.init.setup)                                          \
++              KEEP(*(.init.setup))                                    \
+               VMLINUX_SYMBOL(__setup_end) = .;
+ #define INIT_CALLS_LEVEL(level)                                               \
+               VMLINUX_SYMBOL(__initcall##level##_start) = .;          \
+-              *(.initcall##level##.init)                              \
+-              *(.initcall##level##s.init)                             \
++              KEEP(*(.initcall##level##.init))                        \
++              KEEP(*(.initcall##level##s.init))                       \
+ #define INIT_CALLS                                                    \
+               VMLINUX_SYMBOL(__initcall_start) = .;                   \
+-              *(.initcallearly.init)                                  \
++              KEEP(*(.initcallearly.init))                            \
+               INIT_CALLS_LEVEL(0)                                     \
+               INIT_CALLS_LEVEL(1)                                     \
+               INIT_CALLS_LEVEL(2)                                     \
+@@ -646,21 +647,21 @@
+ #define CON_INITCALL                                                  \
+               VMLINUX_SYMBOL(__con_initcall_start) = .;               \
+-              *(.con_initcall.init)                                   \
++              KEEP(*(.con_initcall.init))                             \
+               VMLINUX_SYMBOL(__con_initcall_end) = .;
+ #define SECURITY_INITCALL                                             \
+               VMLINUX_SYMBOL(__security_initcall_start) = .;          \
+-              *(.security_initcall.init)                              \
++              KEEP(*(.security_initcall.init))                        \
+               VMLINUX_SYMBOL(__security_initcall_end) = .;
+ #ifdef CONFIG_BLK_DEV_INITRD
+ #define INIT_RAM_FS                                                   \
+       . = ALIGN(4);                                                   \
+       VMLINUX_SYMBOL(__initramfs_start) = .;                          \
+-      *(.init.ramfs)                                                  \
++      KEEP(*(.init.ramfs))                                            \
+       . = ALIGN(8);                                                   \
+-      *(.init.ramfs.info)
++      KEEP(*(.init.ramfs.info))
+ #else
+ #define INIT_RAM_FS
+ #endif
diff --git a/target/linux/generic/patches-3.7/220-module_exports.patch b/target/linux/generic/patches-3.7/220-module_exports.patch
deleted file mode 100644 (file)
index fc382c1..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
---- a/include/asm-generic/vmlinux.lds.h
-+++ b/include/asm-generic/vmlinux.lds.h
-@@ -52,6 +52,18 @@
- #define LOAD_OFFSET 0
- #endif
-+#ifndef SYMTAB_KEEP_STR
-+#define SYMTAB_KEEP *(SORT(___ksymtab+*))
-+#define SYMTAB_KEEP_GPL *(SORT(___ksymtab_gpl+*))
-+#define SYMTAB_KEEP_STR *(__ksymtab_strings+*)
-+#endif
-+
-+#ifndef SYMTAB_DISCARD
-+#define SYMTAB_DISCARD
-+#define SYMTAB_DISCARD_GPL
-+#define SYMTAB_DISCARD_STR
-+#endif
-+
- #ifndef SYMBOL_PREFIX
- #define VMLINUX_SYMBOL(sym) sym
- #else
-@@ -276,14 +288,14 @@
-       /* Kernel symbol table: Normal symbols */                       \
-       __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
-               VMLINUX_SYMBOL(__start___ksymtab) = .;                  \
--              *(SORT(___ksymtab+*))                                   \
-+              SYMTAB_KEEP                                             \
-               VMLINUX_SYMBOL(__stop___ksymtab) = .;                   \
-       }                                                               \
-                                                                       \
-       /* Kernel symbol table: GPL-only symbols */                     \
-       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
-               VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;              \
--              *(SORT(___ksymtab_gpl+*))                               \
-+              SYMTAB_KEEP_GPL                                         \
-               VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;               \
-       }                                                               \
-                                                                       \
-@@ -345,7 +357,7 @@
-                                                                       \
-       /* Kernel symbol table: strings */                              \
-         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {       \
--              *(__ksymtab_strings)                                    \
-+              SYMTAB_KEEP_STR                                         \
-       }                                                               \
-                                                                       \
-       /* __*init sections */                                          \
-@@ -679,6 +691,9 @@
-       EXIT_TEXT                                                       \
-       EXIT_DATA                                                       \
-       EXIT_CALL                                                       \
-+      SYMTAB_DISCARD                                                  \
-+      SYMTAB_DISCARD_GPL                                              \
-+      SYMTAB_DISCARD_STR                                              \
-       *(.discard)                                                     \
-       *(.discard.*)                                                   \
-       }
---- a/include/linux/export.h
-+++ b/include/linux/export.h
-@@ -45,12 +45,19 @@ extern struct module __this_module;
- #define __CRC_SYMBOL(sym, sec)
- #endif
-+#ifdef MODULE
-+#define __EXPORT_SUFFIX(sym)
-+#else
-+#define __EXPORT_SUFFIX(sym) "+" #sym
-+#endif
-+
- /* For every exported symbol, place a struct in the __ksymtab section */
- #define __EXPORT_SYMBOL(sym, sec)                             \
-       extern typeof(sym) sym;                                 \
-       __CRC_SYMBOL(sym, sec)                                  \
-       static const char __kstrtab_##sym[]                     \
--      __attribute__((section("__ksymtab_strings"), aligned(1))) \
-+      __attribute__((section("__ksymtab_strings"              \
-+        __EXPORT_SUFFIX(sym)), aligned(1)))                   \
-       = MODULE_SYMBOL_PREFIX #sym;                            \
-       static const struct kernel_symbol __ksymtab_##sym       \
-       __used                                                  \
---- a/scripts/Makefile.build
-+++ b/scripts/Makefile.build
-@@ -348,7 +348,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
- # Linker scripts preprocessor (.lds.S -> .lds)
- # ---------------------------------------------------------------------------
- quiet_cmd_cpp_lds_S = LDS     $@
--      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
-+      cmd_cpp_lds_S = $(CPP) $(EXTRA_LDSFLAGS) $(cpp_flags) -P -C -U$(ARCH) \
-                            -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
- $(obj)/%.lds: $(src)/%.lds.S FORCE
diff --git a/target/linux/generic/patches-3.7/221-module_exports.patch b/target/linux/generic/patches-3.7/221-module_exports.patch
new file mode 100644 (file)
index 0000000..da08de6
--- /dev/null
@@ -0,0 +1,88 @@
+--- a/include/asm-generic/vmlinux.lds.h
++++ b/include/asm-generic/vmlinux.lds.h
+@@ -52,6 +52,16 @@
+ #define LOAD_OFFSET 0
+ #endif
++#ifndef SYMTAB_KEEP
++#define SYMTAB_KEEP KEEP(*(SORT(___ksymtab+*)))
++#define SYMTAB_KEEP_GPL KEEP(*(SORT(___ksymtab_gpl+*)))
++#endif
++
++#ifndef SYMTAB_DISCARD
++#define SYMTAB_DISCARD
++#define SYMTAB_DISCARD_GPL
++#endif
++
+ #ifndef SYMBOL_PREFIX
+ #define VMLINUX_SYMBOL(sym) sym
+ #else
+@@ -277,14 +287,14 @@
+       /* Kernel symbol table: Normal symbols */                       \
+       __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
+               VMLINUX_SYMBOL(__start___ksymtab) = .;                  \
+-              KEEP(*(SORT(___ksymtab+*)))                             \
++              SYMTAB_KEEP                                             \
+               VMLINUX_SYMBOL(__stop___ksymtab) = .;                   \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only symbols */                     \
+       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
+               VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;              \
+-              KEEP(*(SORT(___ksymtab_gpl+*)))                         \
++              SYMTAB_KEEP_GPL                                         \
+               VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;               \
+       }                                                               \
+                                                                       \
+@@ -346,7 +356,7 @@
+                                                                       \
+       /* Kernel symbol table: strings */                              \
+         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {       \
+-              *(__ksymtab_strings)                                    \
++              *(__ksymtab_strings+*)                                  \
+       }                                                               \
+                                                                       \
+       /* __*init sections */                                          \
+@@ -680,6 +690,8 @@
+       EXIT_TEXT                                                       \
+       EXIT_DATA                                                       \
+       EXIT_CALL                                                       \
++      SYMTAB_DISCARD                                                  \
++      SYMTAB_DISCARD_GPL                                              \
+       *(.discard)                                                     \
+       *(.discard.*)                                                   \
+       }
+--- a/scripts/Makefile.build
++++ b/scripts/Makefile.build
+@@ -348,7 +348,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+ # Linker scripts preprocessor (.lds.S -> .lds)
+ # ---------------------------------------------------------------------------
+ quiet_cmd_cpp_lds_S = LDS     $@
+-      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
++      cmd_cpp_lds_S = $(CPP) $(EXTRA_LDSFLAGS) $(cpp_flags) -P -C -U$(ARCH) \
+                            -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
+ $(obj)/%.lds: $(src)/%.lds.S FORCE
+--- a/include/linux/export.h
++++ b/include/linux/export.h
+@@ -45,12 +45,19 @@ extern struct module __this_module;
+ #define __CRC_SYMBOL(sym, sec)
+ #endif
++#ifdef MODULE
++#define __EXPORT_SUFFIX(sym)
++#else
++#define __EXPORT_SUFFIX(sym) "+" #sym
++#endif
++
+ /* For every exported symbol, place a struct in the __ksymtab section */
+ #define __EXPORT_SYMBOL(sym, sec)                             \
+       extern typeof(sym) sym;                                 \
+       __CRC_SYMBOL(sym, sec)                                  \
+       static const char __kstrtab_##sym[]                     \
+-      __attribute__((section("__ksymtab_strings"), aligned(1))) \
++      __attribute__((section("__ksymtab_strings"              \
++        __EXPORT_SUFFIX(sym)), aligned(1)))                   \
+       = MODULE_SYMBOL_PREFIX #sym;                            \
+       static const struct kernel_symbol __ksymtab_##sym       \
+       __used                                                  \
index b09c24d4c32dbd03f97f0afda4e762ba11df7d47..972b876dfed690dfb0f3d4a9f2f5aaa0dc9b0240 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/Makefile.lib
 +++ b/scripts/Makefile.lib
-@@ -296,7 +296,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
+@@ -296,7 +296,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^) 
  
  quiet_cmd_lzma = LZMA    $@
  cmd_lzma = (cat $(filter-out FORCE,$^) | \
index 1da9540050510769c1075252a189525550ab7029..44c6b04fcf4d1f72044666e4f607adf4fbcdb8bf 100644 (file)
@@ -7,5 +7,5 @@
 -cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe
 +cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
  cflags-y                      += -msoft-float
- LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
+ LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections
  KBUILD_AFLAGS_MODULE          += -mlong-calls
index 3c51d14cf7980ce2cc2d95a8ecb58110cee5a408..f0f513741dd03f22c4f5cffdc173132fbcfb4dff 100644 (file)
@@ -3,7 +3,7 @@
 @@ -90,8 +90,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
  cflags-y                      += -msoft-float
- LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
+ LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections
 +ifdef CONFIG_64BIT
  KBUILD_AFLAGS_MODULE          += -mlong-calls
  KBUILD_CFLAGS_MODULE          += -mlong-calls
@@ -12,7 +12,7 @@
 +KBUILD_CFLAGS_MODULE          += -mno-long-calls
 +endif
  
- cflags-y += -ffreestanding
+ KBUILD_CFLAGS_KERNEL          += -ffunction-sections -fdata-sections
  
 --- a/arch/mips/include/asm/module.h
 +++ b/arch/mips/include/asm/module.h
index 981867742531547c11ed4ac124494f5820eae79a..e6056fa5c409f1181b854ef7187f1d1ece0249cf 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/include/asm/string.h
 +++ b/arch/mips/include/asm/string.h
-@@ -133,11 +133,44 @@ strncmp(__const__ char *__cs, __const__
+@@ -133,11 +133,44 @@ strncmp(__const__ char *__cs, __const__ 
  
  #define __HAVE_ARCH_MEMSET
  extern void *memset(void *__s, int __c, size_t __count);
index 2459b6183d38dfa57adbf6f862d9f873de79ff44..e48c0d2c1068c8be7e13f66bfec8c7c87b7161d2 100644 (file)
@@ -1,6 +1,6 @@
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -2378,12 +2378,15 @@ static void dynamic_debug_remove(struct
+@@ -2378,12 +2378,15 @@ static void dynamic_debug_remove(struct 
  
  void * __weak module_alloc(unsigned long size)
  {
index 1b814e97fd6a0f8df6c8177f3d5677432e3ab4e7..4767e769b6321a3a40ba2c74fc5ff3c4c5cf0d52 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Charles Manning <cdhmanning@gmail.com>
  #include <linux/pagemap.h>
  #include <linux/mtd/mtd.h>
  #include <linux/interrupt.h>
-@@ -236,7 +238,9 @@ static int yaffs_file_flush(struct file
+@@ -236,7 +238,9 @@ static int yaffs_file_flush(struct file 
  static int yaffs_file_flush(struct file *file);
  #endif
  
index 1ca189d2eec994b0cfdbe18f16a8f971c540c289..7787d500a9470162bde5bf4e6f70d336de587e9d 100644 (file)
        result = yaffs_rd_chunk_tags_nand(dev,nand_chunk,buffer,&tempTags);
        if(memcmp(buffer,data,dev->data_bytes_per_chunk) ||
                tempTags.obj_id != tags->obj_id ||
-@@ -424,7 +424,7 @@ static int yaffs_write_new_chunk(struct
+@@ -424,7 +424,7 @@ static int yaffs_write_new_chunk(struct 
                 * lot of checks that are most likely not needed.
                 *
                 * Mods to the above
                 * rest of the block.
                 */
  
-@@ -486,7 +486,7 @@ static int yaffs_write_new_chunk(struct
+@@ -486,7 +486,7 @@ static int yaffs_write_new_chunk(struct 
  }
  
  
                                        /* Free chunks already includes softdeleted chunks.
                                         * How ever this chunk is going to soon be really deleted
                                         * which will increment free chunks.
-@@ -2752,7 +2752,7 @@ int yaffs_put_chunk_in_file(yaffs_obj_t
+@@ -2752,7 +2752,7 @@ int yaffs_put_chunk_in_file(yaffs_obj_t 
                                        NULL);
        if (!tn)
                return YAFFS_FAIL;
  #ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
        else if (obj->short_name[0]) {
                yaffs_strcpy(name, obj->short_name);
-@@ -4861,9 +4861,9 @@ int yaffs_set_attribs(yaffs_obj_t *obj,
+@@ -4861,9 +4861,9 @@ int yaffs_set_attribs(yaffs_obj_t *obj, 
        if (valid & ATTR_MODE)
                obj->yst_mode = attr->ia_mode;
        if (valid & ATTR_UID)
  
        if (valid & ATTR_ATIME)
                obj->yst_atime = Y_TIME_CONVERT(attr->ia_atime);
-@@ -4886,9 +4886,9 @@ int yaffs_get_attribs(yaffs_obj_t *obj,
+@@ -4886,9 +4886,9 @@ int yaffs_get_attribs(yaffs_obj_t *obj, 
  
        attr->ia_mode = obj->yst_mode;
        valid |= ATTR_MODE;
index 1e41661ebb60fdbfa7e0ba613e236e4e0d94405a..18e4a51ee35b7226321708364bfa5466ab5c38cd 100644 (file)
  /* LzmaDecode
 --- a/lib/lzma/LzmaDec.c
 +++ b/lib/lzma/LzmaDec.c
-@@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p,
+@@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p, 
    p->needFlush = 0;
  }
  
  {
    CLzmaProps propNew;
    RINOK(LzmaProps_Decode(&propNew, props, propsSize));
-@@ -944,7 +944,7 @@ SRes LzmaDec_AllocateProbs(CLzmaDec *p,
+@@ -944,7 +944,7 @@ SRes LzmaDec_AllocateProbs(CLzmaDec *p, 
    return SZ_OK;
  }
  
  void MatchFinder_Construct(CMatchFinder *p);
  
  /* Conditions:
-@@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p,
+@@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p, 
      UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
      ISzAlloc *alloc);
  void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
index 0c8c5e890b247a6ebedad50f09805461199329b7..dcec3791b21409a7a1f90f948f587c3d879b6010 100644 (file)
@@ -30,7 +30,7 @@
        depends on NETFILTER_ADVANCED
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -131,6 +131,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT)
+@@ -131,6 +131,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT) 
  obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_SOCKET) += xt_socket.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o
index 0081da01df7ccd857a35923aca0ab463d6cfea6a..ded6f5f1533dc3cc6eac15c4b9ed671f42b003a0 100644 (file)
  
        counters = alloc_counters(table);
        if (IS_ERR(counters))
-@@ -960,6 +989,14 @@ copy_entries_to_user(unsigned int total_
-                       ret = -EFAULT;
+@@ -961,6 +990,14 @@ copy_entries_to_user(unsigned int total_
                        goto free_counters;
                }
-+
 +              flags = e->ip.flags & IPT_F_MASK;
 +              if (copy_to_user(userptr + off
 +                               + offsetof(struct ipt_entry, ip.flags),
@@ -88,6 +87,7 @@
 +                      ret = -EFAULT;
 +                      goto free_counters;
 +              }
++
                for (i = sizeof(struct ipt_entry);
                     i < e->target_offset;
+                    i += m->u.match_size) {
index 654d92e316133bb51d629fde72ad24f735dd170f..2a0a51a55f9a82929147162dacb2be28a9195cdd 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net/netlink/af_netlink.c
 +++ b/net/netlink/af_netlink.c
-@@ -895,25 +895,7 @@ void netlink_detachskb(struct sock *sk,
+@@ -895,25 +895,7 @@ void netlink_detachskb(struct sock *sk, 
  
  static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
  {
index 814406df11a723f7b8fafd71ff4ffbc853fc0e16..a111c8127bc89bb2d81f7280b993121d112e67c7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/hostap/hostap_ap.c
 +++ b/drivers/net/wireless/hostap/hostap_ap.c
-@@ -2340,13 +2340,13 @@ int prism2_ap_get_sta_qual(local_info_t
+@@ -2340,13 +2340,13 @@ int prism2_ap_get_sta_qual(local_info_t 
                addr[count].sa_family = ARPHRD_ETHER;
                memcpy(addr[count].sa_data, sta->addr, ETH_ALEN);
                if (sta->last_rx_silence == 0)
index 4065f8aeae767153fdd066a6300adb15caee889f..119760648df123e368af802e82eb0fbbc6e39ef8 100644 (file)
@@ -12,7 +12,7 @@
        help
 --- a/net/core/Makefile
 +++ b/net/core/Makefile
-@@ -8,9 +8,9 @@ obj-y := sock.o request_sock.o skbuff.o
+@@ -8,9 +8,9 @@ obj-y := sock.o request_sock.o skbuff.o 
  obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
  
  obj-y              += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
index 326471421c0bd17c5a3787066350d961f68889f6..1f3b581b720c1a94ea3eab4a32100af3e508057d 100644 (file)
@@ -24,7 +24,7 @@
   * All of these routines try to estimate how many bits of randomness a
   * particular randomness source.  They do this by keeping track of the
   * first and second order deltas of the event timings.
-@@ -799,6 +809,63 @@ void add_disk_randomness(struct gendisk
+@@ -799,6 +809,63 @@ void add_disk_randomness(struct gendisk 
  }
  #endif
  
index 26bb9b8b2995cfc04a5ec95ef90ce1b796ac2a61..315d9ac10149c5972404abab3f9fbb204389a3f9 100644 (file)
@@ -55,7 +55,7 @@ Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
        { .compatible = "arm,cortex-a9-twd-timer",      },
 --- a/drivers/watchdog/mpcore_wdt.c
 +++ b/drivers/watchdog/mpcore_wdt.c
-@@ -102,9 +102,7 @@ static void mpcore_wdt_keepalive(struct
+@@ -102,9 +102,7 @@ static void mpcore_wdt_keepalive(struct 
  
        spin_lock(&wdt_lock);
        /* Assume prescale is set to 256 */
index f6c9a3c1669981a36fa0b715dd3e74c513f87440..04a058ff1feb924771a04e5c00cf5d5056fa7cbb 100644 (file)
  source "fs/fuse/Kconfig"
 +source "fs/overlayfs/Kconfig"
  
- config CUSE
-       tristate "Character device in Userspace support"
+ config GENERIC_ACL
+       bool
 --- a/fs/Makefile
 +++ b/fs/Makefile
 @@ -107,6 +107,7 @@ obj-$(CONFIG_QNX6FS_FS)            += qnx6/
index 1117223eb49e3a27caeae654d65f94f21fc1d8af..5bd661e12491430c17c038e17e5eb10622fe95c3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/usb/host/ehci-hcd.c
 +++ b/drivers/usb/host/ehci-hcd.c
-@@ -634,7 +634,7 @@ static int ehci_run (struct usb_hcd *hcd
+@@ -630,7 +630,7 @@ static int ehci_run (struct usb_hcd *hcd
                "USB %x.%x started, EHCI %x.%02x%s\n",
                ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),
                temp >> 8, temp & 0xff,
@@ -31,7 +31,7 @@
                        /*
 --- a/drivers/usb/host/ehci.h
 +++ b/drivers/usb/host/ehci.h
-@@ -196,6 +196,7 @@ struct ehci_hcd {                  /* one per controlle
+@@ -200,6 +200,7 @@ struct ehci_hcd {                  /* one per controlle
        unsigned                use_dummy_qh:1; /* AMD Frame List table quirk*/
        unsigned                has_synopsys_hc_bug:1; /* Synopsys HC */
        unsigned                frame_index_bug:1; /* MosChip (AKA NetMos) */
diff --git a/target/linux/generic/patches-3.8/220-gc_sections.patch b/target/linux/generic/patches-3.8/220-gc_sections.patch
new file mode 100644 (file)
index 0000000..19c0f15
--- /dev/null
@@ -0,0 +1,372 @@
+--- a/arch/mips/Makefile
++++ b/arch/mips/Makefile
+@@ -89,10 +89,12 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
+ #
+ cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe
+ cflags-y                      += -msoft-float
+-LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
++LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections
+ KBUILD_AFLAGS_MODULE          += -mlong-calls
+ KBUILD_CFLAGS_MODULE          += -mlong-calls
++KBUILD_CFLAGS_KERNEL          += -ffunction-sections -fdata-sections
++
+ cflags-y += -ffreestanding
+ #
+--- a/arch/mips/kernel/vmlinux.lds.S
++++ b/arch/mips/kernel/vmlinux.lds.S
+@@ -67,7 +67,7 @@ SECTIONS
+       /* Exception table for data bus errors */
+       __dbe_table : {
+               __start___dbe_table = .;
+-              *(__dbe_table)
++              KEEP(*(__dbe_table))
+               __stop___dbe_table = .;
+       }
+@@ -112,7 +112,7 @@ SECTIONS
+       . = ALIGN(4);
+       .mips.machines.init : AT(ADDR(.mips.machines.init) - LOAD_OFFSET) {
+               __mips_machines_start = .;
+-              *(.mips.machines.init)
++              KEEP(*(.mips.machines.init))
+               __mips_machines_end = .;
+       }
+--- a/include/asm-generic/vmlinux.lds.h
++++ b/include/asm-generic/vmlinux.lds.h
+@@ -101,7 +101,7 @@
+ #ifdef CONFIG_FTRACE_MCOUNT_RECORD
+ #define MCOUNT_REC()  . = ALIGN(8);                           \
+                       VMLINUX_SYMBOL(__start_mcount_loc) = .; \
+-                      *(__mcount_loc)                         \
++                      KEEP(*(__mcount_loc))                   \
+                       VMLINUX_SYMBOL(__stop_mcount_loc) = .;
+ #else
+ #define MCOUNT_REC()
+@@ -109,7 +109,7 @@
+ #ifdef CONFIG_TRACE_BRANCH_PROFILING
+ #define LIKELY_PROFILE()      VMLINUX_SYMBOL(__start_annotated_branch_profile) = .; \
+-                              *(_ftrace_annotated_branch)                           \
++                              KEEP(*(_ftrace_annotated_branch))                     \
+                               VMLINUX_SYMBOL(__stop_annotated_branch_profile) = .;
+ #else
+ #define LIKELY_PROFILE()
+@@ -117,7 +117,7 @@
+ #ifdef CONFIG_PROFILE_ALL_BRANCHES
+ #define BRANCH_PROFILE()      VMLINUX_SYMBOL(__start_branch_profile) = .;   \
+-                              *(_ftrace_branch)                             \
++                              KEEP(*(_ftrace_branch))                       \
+                               VMLINUX_SYMBOL(__stop_branch_profile) = .;
+ #else
+ #define BRANCH_PROFILE()
+@@ -126,7 +126,7 @@
+ #ifdef CONFIG_EVENT_TRACING
+ #define FTRACE_EVENTS()       . = ALIGN(8);                                   \
+                       VMLINUX_SYMBOL(__start_ftrace_events) = .;      \
+-                      *(_ftrace_events)                               \
++                      KEEP(*(_ftrace_events))                         \
+                       VMLINUX_SYMBOL(__stop_ftrace_events) = .;
+ #else
+ #define FTRACE_EVENTS()
+@@ -134,7 +134,7 @@
+ #ifdef CONFIG_TRACING
+ #define TRACE_PRINTKS() VMLINUX_SYMBOL(__start___trace_bprintk_fmt) = .;      \
+-                       *(__trace_printk_fmt) /* Trace_printk fmt' pointer */ \
++                       KEEP(*(__trace_printk_fmt)) /* Trace_printk fmt' pointer */ \
+                        VMLINUX_SYMBOL(__stop___trace_bprintk_fmt) = .;
+ #else
+ #define TRACE_PRINTKS()
+@@ -143,7 +143,7 @@
+ #ifdef CONFIG_FTRACE_SYSCALLS
+ #define TRACE_SYSCALLS() . = ALIGN(8);                                        \
+                        VMLINUX_SYMBOL(__start_syscalls_metadata) = .; \
+-                       *(__syscalls_metadata)                         \
++                       KEEP(*(__syscalls_metadata))                   \
+                        VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;
+ #else
+ #define TRACE_SYSCALLS()
+@@ -153,7 +153,7 @@
+ #define KERNEL_DTB()                                                  \
+       STRUCT_ALIGN();                                                 \
+       VMLINUX_SYMBOL(__dtb_start) = .;                                \
+-      *(.dtb.init.rodata)                                             \
++      KEEP(*(.dtb.init.rodata))                                       \
+       VMLINUX_SYMBOL(__dtb_end) = .;
+ /* .data section */
+@@ -173,15 +173,16 @@
+       /* implement dynamic printk debug */                            \
+       . = ALIGN(8);                                                   \
+       VMLINUX_SYMBOL(__start___jump_table) = .;                       \
+-      *(__jump_table)                                                 \
++      KEEP(*(__jump_table))                                           \
+       VMLINUX_SYMBOL(__stop___jump_table) = .;                        \
+       . = ALIGN(8);                                                   \
+       VMLINUX_SYMBOL(__start___verbose) = .;                          \
+-      *(__verbose)                                                    \
++      KEEP(*(__verbose))                                              \
+       VMLINUX_SYMBOL(__stop___verbose) = .;                           \
+       LIKELY_PROFILE()                                                \
+       BRANCH_PROFILE()                                                \
+-      TRACE_PRINTKS()
++      TRACE_PRINTKS()                                                 \
++      *(.data.*)
+ /*
+  * Data section helpers
+@@ -235,39 +236,39 @@
+       /* PCI quirks */                                                \
+       .pci_fixup        : AT(ADDR(.pci_fixup) - LOAD_OFFSET) {        \
+               VMLINUX_SYMBOL(__start_pci_fixups_early) = .;           \
+-              *(.pci_fixup_early)                                     \
++              KEEP(*(.pci_fixup_early))                               \
+               VMLINUX_SYMBOL(__end_pci_fixups_early) = .;             \
+               VMLINUX_SYMBOL(__start_pci_fixups_header) = .;          \
+-              *(.pci_fixup_header)                                    \
++              KEEP(*(.pci_fixup_header))                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_header) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_final) = .;           \
+-              *(.pci_fixup_final)                                     \
++              KEEP(*(.pci_fixup_final))                               \
+               VMLINUX_SYMBOL(__end_pci_fixups_final) = .;             \
+               VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;          \
+-              *(.pci_fixup_enable)                                    \
++              KEEP(*(.pci_fixup_enable))                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;          \
+-              *(.pci_fixup_resume)                                    \
++              KEEP(*(.pci_fixup_resume))                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .;    \
+-              *(.pci_fixup_resume_early)                              \
++              KEEP(*(.pci_fixup_resume_early))                        \
+               VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .;      \
+               VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .;         \
+-              *(.pci_fixup_suspend)                                   \
++              KEEP(*(.pci_fixup_suspend))                             \
+               VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .;           \
+       }                                                               \
+                                                                       \
+       /* Built-in firmware blobs */                                   \
+       .builtin_fw        : AT(ADDR(.builtin_fw) - LOAD_OFFSET) {      \
+               VMLINUX_SYMBOL(__start_builtin_fw) = .;                 \
+-              *(.builtin_fw)                                          \
++              KEEP(*(.builtin_fw))                                    \
+               VMLINUX_SYMBOL(__end_builtin_fw) = .;                   \
+       }                                                               \
+                                                                       \
+       /* RapidIO route ops */                                         \
+       .rio_ops        : AT(ADDR(.rio_ops) - LOAD_OFFSET) {            \
+               VMLINUX_SYMBOL(__start_rio_switch_ops) = .;             \
+-              *(.rio_switch_ops)                                      \
++              KEEP(*(.rio_switch_ops))                                \
+               VMLINUX_SYMBOL(__end_rio_switch_ops) = .;               \
+       }                                                               \
+                                                                       \
+@@ -276,49 +277,49 @@
+       /* Kernel symbol table: Normal symbols */                       \
+       __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
+               VMLINUX_SYMBOL(__start___ksymtab) = .;                  \
+-              *(SORT(___ksymtab+*))                                   \
++              KEEP(*(SORT(___ksymtab+*)))                             \
+               VMLINUX_SYMBOL(__stop___ksymtab) = .;                   \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only symbols */                     \
+       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
+               VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;              \
+-              *(SORT(___ksymtab_gpl+*))                               \
++              KEEP(*(SORT(___ksymtab_gpl+*)))                         \
+               VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;               \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: Normal unused symbols */                \
+       __ksymtab_unused  : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) {  \
+               VMLINUX_SYMBOL(__start___ksymtab_unused) = .;           \
+-              *(SORT(___ksymtab_unused+*))                            \
++              KEEP(*(SORT(___ksymtab_unused+*)))                      \
+               VMLINUX_SYMBOL(__stop___ksymtab_unused) = .;            \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only unused symbols */              \
+       __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .;       \
+-              *(SORT(___ksymtab_unused_gpl+*))                        \
++              KEEP(*(SORT(___ksymtab_unused_gpl+*)))                  \
+               VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .;        \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-future-only symbols */              \
+       __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .;       \
+-              *(SORT(___ksymtab_gpl_future+*))                        \
++              KEEP(*(SORT(___ksymtab_gpl_future+*)))                  \
+               VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .;        \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: Normal symbols */                       \
+       __kcrctab         : AT(ADDR(__kcrctab) - LOAD_OFFSET) {         \
+               VMLINUX_SYMBOL(__start___kcrctab) = .;                  \
+-              *(SORT(___kcrctab+*))                                   \
++              KEEP(*(SORT(___kcrctab+*)))                             \
+               VMLINUX_SYMBOL(__stop___kcrctab) = .;                   \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only symbols */                     \
+       __kcrctab_gpl     : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) {     \
+               VMLINUX_SYMBOL(__start___kcrctab_gpl) = .;              \
+-              *(SORT(___kcrctab_gpl+*))                               \
++              KEEP(*(SORT(___kcrctab_gpl+*)))                         \
+               VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .;               \
+       }                                                               \
+                                                                       \
+@@ -332,14 +333,14 @@
+       /* Kernel symbol table: GPL-only unused symbols */              \
+       __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .;       \
+-              *(SORT(___kcrctab_unused_gpl+*))                        \
++              KEEP(*(SORT(___kcrctab_unused_gpl+*)))                  \
+               VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .;        \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-future-only symbols */              \
+       __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \
+               VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .;       \
+-              *(SORT(___kcrctab_gpl_future+*))                        \
++              KEEP(*(SORT(___kcrctab_gpl_future+*)))                  \
+               VMLINUX_SYMBOL(__stop___kcrctab_gpl_future) = .;        \
+       }                                                               \
+                                                                       \
+@@ -362,14 +363,14 @@
+       /* Built-in module parameters. */                               \
+       __param : AT(ADDR(__param) - LOAD_OFFSET) {                     \
+               VMLINUX_SYMBOL(__start___param) = .;                    \
+-              *(__param)                                              \
++              KEEP(*(__param))                                        \
+               VMLINUX_SYMBOL(__stop___param) = .;                     \
+       }                                                               \
+                                                                       \
+       /* Built-in module versions. */                                 \
+       __modver : AT(ADDR(__modver) - LOAD_OFFSET) {                   \
+               VMLINUX_SYMBOL(__start___modver) = .;                   \
+-              *(__modver)                                             \
++              KEEP(*(__modver))                                       \
+               VMLINUX_SYMBOL(__stop___modver) = .;                    \
+               . = ALIGN((align));                                     \
+               VMLINUX_SYMBOL(__end_rodata) = .;                       \
+@@ -429,7 +430,7 @@
+ #define ENTRY_TEXT                                                    \
+               ALIGN_FUNCTION();                                       \
+               VMLINUX_SYMBOL(__entry_text_start) = .;                 \
+-              *(.entry.text)                                          \
++              KEEP(*(.entry.text))                                    \
+               VMLINUX_SYMBOL(__entry_text_end) = .;
+ #ifdef CONFIG_FUNCTION_GRAPH_TRACER
+@@ -457,7 +458,7 @@
+       . = ALIGN(align);                                               \
+       __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {               \
+               VMLINUX_SYMBOL(__start___ex_table) = .;                 \
+-              *(__ex_table)                                           \
++              KEEP(*(__ex_table))                                             \
+               VMLINUX_SYMBOL(__stop___ex_table) = .;                  \
+       }
+@@ -473,7 +474,7 @@
+ #ifdef CONFIG_CONSTRUCTORS
+ #define KERNEL_CTORS()        . = ALIGN(8);                      \
+                       VMLINUX_SYMBOL(__ctors_start) = .; \
+-                      *(.ctors)                          \
++                      KEEP(*(.ctors))                    \
+                       VMLINUX_SYMBOL(__ctors_end) = .;
+ #else
+ #define KERNEL_CTORS()
+@@ -526,7 +527,7 @@
+ #define SBSS(sbss_align)                                              \
+       . = ALIGN(sbss_align);                                          \
+       .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) {                         \
+-              *(.sbss)                                                \
++              *(.sbss .sbss.*)                                        \
+               *(.scommon)                                             \
+       }
+@@ -544,7 +545,7 @@
+               BSS_FIRST_SECTIONS                                      \
+               *(.bss..page_aligned)                                   \
+               *(.dynbss)                                              \
+-              *(.bss)                                                 \
++              *(.bss .bss.*)                                          \
+               *(COMMON)                                               \
+       }
+@@ -593,7 +594,7 @@
+       . = ALIGN(8);                                                   \
+       __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) {             \
+               VMLINUX_SYMBOL(__start___bug_table) = .;                \
+-              *(__bug_table)                                          \
++              KEEP(*(__bug_table))                                    \
+               VMLINUX_SYMBOL(__stop___bug_table) = .;                 \
+       }
+ #else
+@@ -605,7 +606,7 @@
+       . = ALIGN(4);                                                   \
+       .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {               \
+               VMLINUX_SYMBOL(__tracedata_start) = .;                  \
+-              *(.tracedata)                                           \
++              KEEP(*(.tracedata))                                     \
+               VMLINUX_SYMBOL(__tracedata_end) = .;                    \
+       }
+ #else
+@@ -622,17 +623,17 @@
+ #define INIT_SETUP(initsetup_align)                                   \
+               . = ALIGN(initsetup_align);                             \
+               VMLINUX_SYMBOL(__setup_start) = .;                      \
+-              *(.init.setup)                                          \
++              KEEP(*(.init.setup))                                    \
+               VMLINUX_SYMBOL(__setup_end) = .;
+ #define INIT_CALLS_LEVEL(level)                                               \
+               VMLINUX_SYMBOL(__initcall##level##_start) = .;          \
+-              *(.initcall##level##.init)                              \
+-              *(.initcall##level##s.init)                             \
++              KEEP(*(.initcall##level##.init))                        \
++              KEEP(*(.initcall##level##s.init))                       \
+ #define INIT_CALLS                                                    \
+               VMLINUX_SYMBOL(__initcall_start) = .;                   \
+-              *(.initcallearly.init)                                  \
++              KEEP(*(.initcallearly.init))                            \
+               INIT_CALLS_LEVEL(0)                                     \
+               INIT_CALLS_LEVEL(1)                                     \
+               INIT_CALLS_LEVEL(2)                                     \
+@@ -646,21 +647,21 @@
+ #define CON_INITCALL                                                  \
+               VMLINUX_SYMBOL(__con_initcall_start) = .;               \
+-              *(.con_initcall.init)                                   \
++              KEEP(*(.con_initcall.init))                             \
+               VMLINUX_SYMBOL(__con_initcall_end) = .;
+ #define SECURITY_INITCALL                                             \
+               VMLINUX_SYMBOL(__security_initcall_start) = .;          \
+-              *(.security_initcall.init)                              \
++              KEEP(*(.security_initcall.init))                        \
+               VMLINUX_SYMBOL(__security_initcall_end) = .;
+ #ifdef CONFIG_BLK_DEV_INITRD
+ #define INIT_RAM_FS                                                   \
+       . = ALIGN(4);                                                   \
+       VMLINUX_SYMBOL(__initramfs_start) = .;                          \
+-      *(.init.ramfs)                                                  \
++      KEEP(*(.init.ramfs))                                            \
+       . = ALIGN(8);                                                   \
+-      *(.init.ramfs.info)
++      KEEP(*(.init.ramfs.info))
+ #else
+ #define INIT_RAM_FS
+ #endif
diff --git a/target/linux/generic/patches-3.8/220-module_exports.patch b/target/linux/generic/patches-3.8/220-module_exports.patch
deleted file mode 100644 (file)
index fc382c1..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
---- a/include/asm-generic/vmlinux.lds.h
-+++ b/include/asm-generic/vmlinux.lds.h
-@@ -52,6 +52,18 @@
- #define LOAD_OFFSET 0
- #endif
-+#ifndef SYMTAB_KEEP_STR
-+#define SYMTAB_KEEP *(SORT(___ksymtab+*))
-+#define SYMTAB_KEEP_GPL *(SORT(___ksymtab_gpl+*))
-+#define SYMTAB_KEEP_STR *(__ksymtab_strings+*)
-+#endif
-+
-+#ifndef SYMTAB_DISCARD
-+#define SYMTAB_DISCARD
-+#define SYMTAB_DISCARD_GPL
-+#define SYMTAB_DISCARD_STR
-+#endif
-+
- #ifndef SYMBOL_PREFIX
- #define VMLINUX_SYMBOL(sym) sym
- #else
-@@ -276,14 +288,14 @@
-       /* Kernel symbol table: Normal symbols */                       \
-       __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
-               VMLINUX_SYMBOL(__start___ksymtab) = .;                  \
--              *(SORT(___ksymtab+*))                                   \
-+              SYMTAB_KEEP                                             \
-               VMLINUX_SYMBOL(__stop___ksymtab) = .;                   \
-       }                                                               \
-                                                                       \
-       /* Kernel symbol table: GPL-only symbols */                     \
-       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
-               VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;              \
--              *(SORT(___ksymtab_gpl+*))                               \
-+              SYMTAB_KEEP_GPL                                         \
-               VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;               \
-       }                                                               \
-                                                                       \
-@@ -345,7 +357,7 @@
-                                                                       \
-       /* Kernel symbol table: strings */                              \
-         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {       \
--              *(__ksymtab_strings)                                    \
-+              SYMTAB_KEEP_STR                                         \
-       }                                                               \
-                                                                       \
-       /* __*init sections */                                          \
-@@ -679,6 +691,9 @@
-       EXIT_TEXT                                                       \
-       EXIT_DATA                                                       \
-       EXIT_CALL                                                       \
-+      SYMTAB_DISCARD                                                  \
-+      SYMTAB_DISCARD_GPL                                              \
-+      SYMTAB_DISCARD_STR                                              \
-       *(.discard)                                                     \
-       *(.discard.*)                                                   \
-       }
---- a/include/linux/export.h
-+++ b/include/linux/export.h
-@@ -45,12 +45,19 @@ extern struct module __this_module;
- #define __CRC_SYMBOL(sym, sec)
- #endif
-+#ifdef MODULE
-+#define __EXPORT_SUFFIX(sym)
-+#else
-+#define __EXPORT_SUFFIX(sym) "+" #sym
-+#endif
-+
- /* For every exported symbol, place a struct in the __ksymtab section */
- #define __EXPORT_SYMBOL(sym, sec)                             \
-       extern typeof(sym) sym;                                 \
-       __CRC_SYMBOL(sym, sec)                                  \
-       static const char __kstrtab_##sym[]                     \
--      __attribute__((section("__ksymtab_strings"), aligned(1))) \
-+      __attribute__((section("__ksymtab_strings"              \
-+        __EXPORT_SUFFIX(sym)), aligned(1)))                   \
-       = MODULE_SYMBOL_PREFIX #sym;                            \
-       static const struct kernel_symbol __ksymtab_##sym       \
-       __used                                                  \
---- a/scripts/Makefile.build
-+++ b/scripts/Makefile.build
-@@ -348,7 +348,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
- # Linker scripts preprocessor (.lds.S -> .lds)
- # ---------------------------------------------------------------------------
- quiet_cmd_cpp_lds_S = LDS     $@
--      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
-+      cmd_cpp_lds_S = $(CPP) $(EXTRA_LDSFLAGS) $(cpp_flags) -P -C -U$(ARCH) \
-                            -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
- $(obj)/%.lds: $(src)/%.lds.S FORCE
diff --git a/target/linux/generic/patches-3.8/221-module_exports.patch b/target/linux/generic/patches-3.8/221-module_exports.patch
new file mode 100644 (file)
index 0000000..da08de6
--- /dev/null
@@ -0,0 +1,88 @@
+--- a/include/asm-generic/vmlinux.lds.h
++++ b/include/asm-generic/vmlinux.lds.h
+@@ -52,6 +52,16 @@
+ #define LOAD_OFFSET 0
+ #endif
++#ifndef SYMTAB_KEEP
++#define SYMTAB_KEEP KEEP(*(SORT(___ksymtab+*)))
++#define SYMTAB_KEEP_GPL KEEP(*(SORT(___ksymtab_gpl+*)))
++#endif
++
++#ifndef SYMTAB_DISCARD
++#define SYMTAB_DISCARD
++#define SYMTAB_DISCARD_GPL
++#endif
++
+ #ifndef SYMBOL_PREFIX
+ #define VMLINUX_SYMBOL(sym) sym
+ #else
+@@ -277,14 +287,14 @@
+       /* Kernel symbol table: Normal symbols */                       \
+       __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
+               VMLINUX_SYMBOL(__start___ksymtab) = .;                  \
+-              KEEP(*(SORT(___ksymtab+*)))                             \
++              SYMTAB_KEEP                                             \
+               VMLINUX_SYMBOL(__stop___ksymtab) = .;                   \
+       }                                                               \
+                                                                       \
+       /* Kernel symbol table: GPL-only symbols */                     \
+       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
+               VMLINUX_SYMBOL(__start___ksymtab_gpl) = .;              \
+-              KEEP(*(SORT(___ksymtab_gpl+*)))                         \
++              SYMTAB_KEEP_GPL                                         \
+               VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .;               \
+       }                                                               \
+                                                                       \
+@@ -346,7 +356,7 @@
+                                                                       \
+       /* Kernel symbol table: strings */                              \
+         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {       \
+-              *(__ksymtab_strings)                                    \
++              *(__ksymtab_strings+*)                                  \
+       }                                                               \
+                                                                       \
+       /* __*init sections */                                          \
+@@ -680,6 +690,8 @@
+       EXIT_TEXT                                                       \
+       EXIT_DATA                                                       \
+       EXIT_CALL                                                       \
++      SYMTAB_DISCARD                                                  \
++      SYMTAB_DISCARD_GPL                                              \
+       *(.discard)                                                     \
+       *(.discard.*)                                                   \
+       }
+--- a/scripts/Makefile.build
++++ b/scripts/Makefile.build
+@@ -348,7 +348,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+ # Linker scripts preprocessor (.lds.S -> .lds)
+ # ---------------------------------------------------------------------------
+ quiet_cmd_cpp_lds_S = LDS     $@
+-      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \
++      cmd_cpp_lds_S = $(CPP) $(EXTRA_LDSFLAGS) $(cpp_flags) -P -C -U$(ARCH) \
+                            -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
+ $(obj)/%.lds: $(src)/%.lds.S FORCE
+--- a/include/linux/export.h
++++ b/include/linux/export.h
+@@ -45,12 +45,19 @@ extern struct module __this_module;
+ #define __CRC_SYMBOL(sym, sec)
+ #endif
++#ifdef MODULE
++#define __EXPORT_SUFFIX(sym)
++#else
++#define __EXPORT_SUFFIX(sym) "+" #sym
++#endif
++
+ /* For every exported symbol, place a struct in the __ksymtab section */
+ #define __EXPORT_SYMBOL(sym, sec)                             \
+       extern typeof(sym) sym;                                 \
+       __CRC_SYMBOL(sym, sec)                                  \
+       static const char __kstrtab_##sym[]                     \
+-      __attribute__((section("__ksymtab_strings"), aligned(1))) \
++      __attribute__((section("__ksymtab_strings"              \
++        __EXPORT_SUFFIX(sym)), aligned(1)))                   \
+       = MODULE_SYMBOL_PREFIX #sym;                            \
+       static const struct kernel_symbol __ksymtab_##sym       \
+       __used                                                  \
index 55434c13ab2f93fa50486a986598152d3dba9551..b6bb77023a5ee6304800b4955eaece915fc657c1 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/Makefile.lib
 +++ b/scripts/Makefile.lib
-@@ -299,7 +299,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
+@@ -299,7 +299,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^) 
  
  quiet_cmd_lzma = LZMA    $@
  cmd_lzma = (cat $(filter-out FORCE,$^) | \
index 1da9540050510769c1075252a189525550ab7029..44c6b04fcf4d1f72044666e4f607adf4fbcdb8bf 100644 (file)
@@ -7,5 +7,5 @@
 -cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe
 +cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
  cflags-y                      += -msoft-float
- LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
+ LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections
  KBUILD_AFLAGS_MODULE          += -mlong-calls
index 3c51d14cf7980ce2cc2d95a8ecb58110cee5a408..f0f513741dd03f22c4f5cffdc173132fbcfb4dff 100644 (file)
@@ -3,7 +3,7 @@
 @@ -90,8 +90,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin
  cflags-y                      += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely
  cflags-y                      += -msoft-float
- LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib
+ LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections
 +ifdef CONFIG_64BIT
  KBUILD_AFLAGS_MODULE          += -mlong-calls
  KBUILD_CFLAGS_MODULE          += -mlong-calls
@@ -12,7 +12,7 @@
 +KBUILD_CFLAGS_MODULE          += -mno-long-calls
 +endif
  
- cflags-y += -ffreestanding
+ KBUILD_CFLAGS_KERNEL          += -ffunction-sections -fdata-sections
  
 --- a/arch/mips/include/asm/module.h
 +++ b/arch/mips/include/asm/module.h
index 981867742531547c11ed4ac124494f5820eae79a..e6056fa5c409f1181b854ef7187f1d1ece0249cf 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/include/asm/string.h
 +++ b/arch/mips/include/asm/string.h
-@@ -133,11 +133,44 @@ strncmp(__const__ char *__cs, __const__
+@@ -133,11 +133,44 @@ strncmp(__const__ char *__cs, __const__ 
  
  #define __HAVE_ARCH_MEMSET
  extern void *memset(void *__s, int __c, size_t __count);
index 36d9caac7b158de8c4ad9baafe4f39025b2bbfb9..7af5e4bd3f3d03ccfef86515ee29cb0e43d97f68 100644 (file)
@@ -27,7 +27,7 @@
        /* Spansion -- single (large) sector size only, at least
         * for the chips listed here (without boot sectors).
         */
-@@ -909,6 +915,9 @@ static int m25p_probe(struct spi_device
+@@ -909,6 +915,9 @@ static int m25p_probe(struct spi_device 
        if (info->flags & SECT_4K) {
                flash->erase_opcode = OPCODE_BE_4K;
                flash->mtd.erasesize = 4096;
index ba1526ce521a24eb57b8f8133cae9efc3007d800..83d6aa7e24d340dde575f4ea561d13f9037fae2e 100644 (file)
@@ -30,7 +30,7 @@
  /****************************************************************************/
  
  struct m25p {
-@@ -913,7 +919,7 @@ static int m25p_probe(struct spi_device
+@@ -913,7 +919,7 @@ static int m25p_probe(struct spi_device 
                flash->mtd._write = m25p80_write;
  
        /* prefer "small sector" erase if possible */
index 1b814e97fd6a0f8df6c8177f3d5677432e3ab4e7..4767e769b6321a3a40ba2c74fc5ff3c4c5cf0d52 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Charles Manning <cdhmanning@gmail.com>
  #include <linux/pagemap.h>
  #include <linux/mtd/mtd.h>
  #include <linux/interrupt.h>
-@@ -236,7 +238,9 @@ static int yaffs_file_flush(struct file
+@@ -236,7 +238,9 @@ static int yaffs_file_flush(struct file 
  static int yaffs_file_flush(struct file *file);
  #endif
  
index 1ca189d2eec994b0cfdbe18f16a8f971c540c289..7787d500a9470162bde5bf4e6f70d336de587e9d 100644 (file)
        result = yaffs_rd_chunk_tags_nand(dev,nand_chunk,buffer,&tempTags);
        if(memcmp(buffer,data,dev->data_bytes_per_chunk) ||
                tempTags.obj_id != tags->obj_id ||
-@@ -424,7 +424,7 @@ static int yaffs_write_new_chunk(struct
+@@ -424,7 +424,7 @@ static int yaffs_write_new_chunk(struct 
                 * lot of checks that are most likely not needed.
                 *
                 * Mods to the above
                 * rest of the block.
                 */
  
-@@ -486,7 +486,7 @@ static int yaffs_write_new_chunk(struct
+@@ -486,7 +486,7 @@ static int yaffs_write_new_chunk(struct 
  }
  
  
                                        /* Free chunks already includes softdeleted chunks.
                                         * How ever this chunk is going to soon be really deleted
                                         * which will increment free chunks.
-@@ -2752,7 +2752,7 @@ int yaffs_put_chunk_in_file(yaffs_obj_t
+@@ -2752,7 +2752,7 @@ int yaffs_put_chunk_in_file(yaffs_obj_t 
                                        NULL);
        if (!tn)
                return YAFFS_FAIL;
  #ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM
        else if (obj->short_name[0]) {
                yaffs_strcpy(name, obj->short_name);
-@@ -4861,9 +4861,9 @@ int yaffs_set_attribs(yaffs_obj_t *obj,
+@@ -4861,9 +4861,9 @@ int yaffs_set_attribs(yaffs_obj_t *obj, 
        if (valid & ATTR_MODE)
                obj->yst_mode = attr->ia_mode;
        if (valid & ATTR_UID)
  
        if (valid & ATTR_ATIME)
                obj->yst_atime = Y_TIME_CONVERT(attr->ia_atime);
-@@ -4886,9 +4886,9 @@ int yaffs_get_attribs(yaffs_obj_t *obj,
+@@ -4886,9 +4886,9 @@ int yaffs_get_attribs(yaffs_obj_t *obj, 
  
        attr->ia_mode = obj->yst_mode;
        valid |= ATTR_MODE;
index 1e41661ebb60fdbfa7e0ba613e236e4e0d94405a..18e4a51ee35b7226321708364bfa5466ab5c38cd 100644 (file)
  /* LzmaDecode
 --- a/lib/lzma/LzmaDec.c
 +++ b/lib/lzma/LzmaDec.c
-@@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p,
+@@ -682,7 +682,7 @@ static void LzmaDec_InitRc(CLzmaDec *p, 
    p->needFlush = 0;
  }
  
  {
    CLzmaProps propNew;
    RINOK(LzmaProps_Decode(&propNew, props, propsSize));
-@@ -944,7 +944,7 @@ SRes LzmaDec_AllocateProbs(CLzmaDec *p,
+@@ -944,7 +944,7 @@ SRes LzmaDec_AllocateProbs(CLzmaDec *p, 
    return SZ_OK;
  }
  
  void MatchFinder_Construct(CMatchFinder *p);
  
  /* Conditions:
-@@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p,
+@@ -70,12 +65,6 @@ int MatchFinder_Create(CMatchFinder *p, 
      UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
      ISzAlloc *alloc);
  void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc);
index 08c012cdc786892cde4dab7b2dc3ce0f7931197b..66e95146843fd8d02e273302b9315c6f02ddccdf 100644 (file)
@@ -30,7 +30,7 @@
        depends on NETFILTER_ADVANCED
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -131,6 +131,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT)
+@@ -131,6 +131,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT) 
  obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_SOCKET) += xt_socket.o
  obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o
index 0081da01df7ccd857a35923aca0ab463d6cfea6a..ded6f5f1533dc3cc6eac15c4b9ed671f42b003a0 100644 (file)
  
        counters = alloc_counters(table);
        if (IS_ERR(counters))
-@@ -960,6 +989,14 @@ copy_entries_to_user(unsigned int total_
-                       ret = -EFAULT;
+@@ -961,6 +990,14 @@ copy_entries_to_user(unsigned int total_
                        goto free_counters;
                }
-+
 +              flags = e->ip.flags & IPT_F_MASK;
 +              if (copy_to_user(userptr + off
 +                               + offsetof(struct ipt_entry, ip.flags),
@@ -88,6 +87,7 @@
 +                      ret = -EFAULT;
 +                      goto free_counters;
 +              }
++
                for (i = sizeof(struct ipt_entry);
                     i < e->target_offset;
+                    i += m->u.match_size) {
index 870ae944a110a070ef86138d34a1a6b3f2022b69..c5c967d20bbc6f17ce24daf42deb2e3465266608 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net/netlink/af_netlink.c
 +++ b/net/netlink/af_netlink.c
-@@ -898,25 +898,7 @@ void netlink_detachskb(struct sock *sk,
+@@ -898,25 +898,7 @@ void netlink_detachskb(struct sock *sk, 
  
  static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
  {
index 814406df11a723f7b8fafd71ff4ffbc853fc0e16..a111c8127bc89bb2d81f7280b993121d112e67c7 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/hostap/hostap_ap.c
 +++ b/drivers/net/wireless/hostap/hostap_ap.c
-@@ -2340,13 +2340,13 @@ int prism2_ap_get_sta_qual(local_info_t
+@@ -2340,13 +2340,13 @@ int prism2_ap_get_sta_qual(local_info_t 
                addr[count].sa_family = ARPHRD_ETHER;
                memcpy(addr[count].sa_data, sta->addr, ETH_ALEN);
                if (sta->last_rx_silence == 0)
index cd8551bc745fb89c26bda35fc65f52884bf295ef..02d97cc5bfea23eeb7e1a51dd535d397606a5fb7 100644 (file)
@@ -15,7 +15,7 @@
        default y
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -44,6 +44,7 @@ static void quirk_mmio_always_on(struct
+@@ -44,6 +44,7 @@ static void quirk_mmio_always_on(struct 
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
                                PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  
index 4065f8aeae767153fdd066a6300adb15caee889f..119760648df123e368af802e82eb0fbbc6e39ef8 100644 (file)
@@ -12,7 +12,7 @@
        help
 --- a/net/core/Makefile
 +++ b/net/core/Makefile
-@@ -8,9 +8,9 @@ obj-y := sock.o request_sock.o skbuff.o
+@@ -8,9 +8,9 @@ obj-y := sock.o request_sock.o skbuff.o 
  obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
  
  obj-y              += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
index 5a1e2f4a65855d90e0f68c47bc74e7d73d0eec5a..6202aa5ec334a258a86305f0a6731646cb044662 100644 (file)
@@ -1,6 +1,6 @@
 --- a/init/main.c
 +++ b/init/main.c
-@@ -878,7 +878,7 @@ static void __init kernel_init_freeable(
+@@ -878,7 +878,7 @@ static noinline void __init kernel_init_
  
        /* Open the /dev/console on the rootfs, this should never fail */
        if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
index 3c2ba0d38d0f27772d78e9945375d2ee39a3d8ce..dec3c282115cd29486218f3c6e178c14e98b27ea 100644 (file)
@@ -24,7 +24,7 @@
   * All of these routines try to estimate how many bits of randomness a
   * particular randomness source.  They do this by keeping track of the
   * first and second order deltas of the event timings.
-@@ -796,6 +806,63 @@ void add_disk_randomness(struct gendisk
+@@ -796,6 +806,63 @@ void add_disk_randomness(struct gendisk 
  }
  #endif
  
index c1819b1b88e1c2154d1b6664163b134b8ccc9e59..aae62f23805fe257ae0d40f466210a80c6a75334 100644 (file)
@@ -52,7 +52,7 @@
   * When we die, we re-parent all our children, and try to:
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -3633,6 +3633,7 @@ int can_nice(const struct task_struct *p
+@@ -3634,6 +3634,7 @@ int can_nice(const struct task_struct *p
        return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
                capable(CAP_SYS_NICE));
  }
index 8d7390ebda4a163340af771758260eb64ba6ce8d..611b858268e06e2569b8ebd341fddb538cad12d2 100644 (file)
@@ -55,7 +55,7 @@ Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
        { .compatible = "arm,cortex-a9-twd-timer",      },
 --- a/drivers/watchdog/mpcore_wdt.c
 +++ b/drivers/watchdog/mpcore_wdt.c
-@@ -101,9 +101,7 @@ static void mpcore_wdt_keepalive(struct
+@@ -101,9 +101,7 @@ static void mpcore_wdt_keepalive(struct 
  
        spin_lock(&wdt_lock);
        /* Assume prescale is set to 256 */