gemini: drop kernel 3.9 support
[openwrt/staging/mkresin.git] / target / linux / generic / patches-3.9 / 220-gc_sections.patch
index 5b0cfa96b8ea95002b721928aa6c5816d656e513..952851b879a772803939a83db913501ee00fc8a3 100644 (file)
@@ -5,7 +5,7 @@
  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
++LDFLAGS_vmlinux                       += -G 0 -static -n -nostdlib --gc-sections --sort-section=name
  KBUILD_AFLAGS_MODULE          += -mlong-calls
  KBUILD_CFLAGS_MODULE          += -mlong-calls
  
                         VMLINUX_SYMBOL(__stop_syscalls_metadata) = .;
  #else
  #define TRACE_SYSCALLS()
+@@ -152,8 +152,8 @@
+ #ifdef CONFIG_CLKSRC_OF
+ #define CLKSRC_OF_TABLES() . = ALIGN(8);                              \
+                          VMLINUX_SYMBOL(__clksrc_of_table) = .;       \
+-                         *(__clksrc_of_table)                         \
+-                         *(__clksrc_of_table_end)
++                         KEEP(*(__clksrc_of_table))                   \
++                         KEEP(*(__clksrc_of_table_end))
+ #else
+ #define CLKSRC_OF_TABLES()
+ #endif
+@@ -162,8 +162,8 @@
+ #define IRQCHIP_OF_MATCH_TABLE()                                      \
+       . = ALIGN(8);                                                   \
+       VMLINUX_SYMBOL(__irqchip_begin) = .;                            \
+-      *(__irqchip_of_table)                                           \
+-      *(__irqchip_of_end)
++      KEEP(*(__irqchip_of_table))                                     \
++      KEEP(*(__irqchip_of_end))
+ #else
+ #define IRQCHIP_OF_MATCH_TABLE()
+ #endif
+@@ -171,8 +171,8 @@
+ #ifdef CONFIG_COMMON_CLK
+ #define CLK_OF_TABLES() . = ALIGN(8);                         \
+                       VMLINUX_SYMBOL(__clk_of_table) = .;     \
+-                      *(__clk_of_table)                       \
+-                      *(__clk_of_table_end)
++                      KEEP(*(__clk_of_table))                 \
++                      KEEP(*(__clk_of_table_end))
+ #else
+ #define CLK_OF_TABLES()
+ #endif
 @@ -180,7 +180,7 @@
  #define KERNEL_DTB()                                                  \
        STRUCT_ALIGN();                                                 \
  ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
  LDFLAGS_vmlinux       += --be8
  endif
-+LDFLAGS_vmlinux += --gc-sections
++LDFLAGS_vmlinux += --gc-sections --sort-section=name
  
  OBJCOPYFLAGS  :=-O binary -R .comment -S
  GZFLAGS               :=-9
 +KBUILD_CFLAGS_KERNEL := $(patsubst -f%-sections,,$(KBUILD_CFLAGS_KERNEL))
  
  ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
- asflags-y := -Wa,-march=all -DZIMAGE
+ asflags-y := -DZIMAGE