202-reduce_module_size.patch 1.0 KB

1234567891011121314151617181920212223242526272829
  1. From fd66884da2f96d2a7ea73f58b1b86251b959a913 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <[email protected]>
  3. Date: Fri, 7 Jul 2017 16:56:19 +0200
  4. Subject: kernel: strip unnecessary symbol table information from kernel modules
  5. reduces default squashfs size on ar71xx by about 4k
  6. lede-commit: 058d331a39077f159ca8922f1f422a1346d6aa67
  7. Signed-off-by: Felix Fietkau <[email protected]>
  8. ---
  9. Makefile | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. diff --git a/Makefile b/Makefile
  12. index a40b373eba3a..984eb5907d00 100644
  13. --- a/Makefile
  14. +++ b/Makefile
  15. @@ -407,7 +407,7 @@ KBUILD_CFLAGS_KERNEL :=
  16. KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE)
  17. KBUILD_AFLAGS_MODULE := -DMODULE
  18. KBUILD_CFLAGS_MODULE := -DMODULE
  19. -KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
  20. +KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
  21. # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  22. KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  23. --
  24. 2.11.0