kernel: add DT binding support to the jimage parser
[oweals/openwrt.git] / target / linux / generic / hack-4.9 / 220-gc_sections.patch
index 428fcb6501a87eb3f593e3f1ab72a44b00f06ef3..31317448992b89efa825d1f0aa8b2658397b849f 100644 (file)
@@ -21,9 +21,9 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -409,6 +409,11 @@ KBUILD_AFLAGS_MODULE  := -DMODULE
- KBUILD_CFLAGS_MODULE  := -DMODULE
+@@ -406,6 +406,11 @@ KBUILD_CFLAGS_MODULE  := -DMODULE
  KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
+ GCC_PLUGINS_CFLAGS :=
  
 +ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
 +KBUILD_CFLAGS_KERNEL  += $(call cc-option,-ffunction-sections,)
@@ -33,9 +33,9 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -633,11 +638,6 @@ KBUILD_CFLAGS     += $(call cc-disable-warni
- KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
+@@ -638,11 +643,6 @@ KBUILD_CFLAGS     += $(call cc-disable-warni
  KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
+ KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
  
 -ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
 -KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,)
@@ -201,6 +201,33 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
 --- a/include/asm-generic/vmlinux.lds.h
 +++ b/include/asm-generic/vmlinux.lds.h
+@@ -105,7 +105,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()
+@@ -113,7 +113,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()
+@@ -121,7 +121,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()
 @@ -130,7 +130,7 @@
  #ifdef CONFIG_KPROBES
  #define KPROBE_BLACKLIST()    . = ALIGN(8);                                 \
@@ -234,7 +261,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #define TRACE_SYSCALLS()
 @@ -172,7 +172,7 @@
  #ifdef CONFIG_SERIAL_EARLYCON
- #define EARLYCON_TABLE() STRUCT_ALIGN();                      \
+ #define EARLYCON_TABLE() . = ALIGN(8);                                \
                         VMLINUX_SYMBOL(__earlycon_table) = .;  \
 -                       *(__earlycon_table)                    \
 +                       KEEP(*(__earlycon_table))              \