202-reduce_module_size.patch 879 B

123456789101112131415161718192021222324
  1. From fd66884da2f96d2a7ea73f58b1b86251b959a913 Mon Sep 17 00:00:00 2001
  2. From: Felix Fietkau <nbd@nbd.name>
  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 <nbd@nbd.name>
  8. ---
  9. Makefile | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. --- a/Makefile
  12. +++ b/Makefile
  13. @@ -425,7 +425,7 @@ KBUILD_AFLAGS_KERNEL :=
  14. KBUILD_CFLAGS_KERNEL :=
  15. KBUILD_AFLAGS_MODULE := -DMODULE
  16. KBUILD_CFLAGS_MODULE := -DMODULE
  17. -KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
  18. +KBUILD_LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
  19. GCC_PLUGINS_CFLAGS :=
  20. export ARCH SRCARCH SUBARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD