aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-17 13:03:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-03-17 13:03:14 +0000
commit7fd4ed413fdd3073ab0ceac67a0bd6871fdc3ba7 (patch)
tree49ae19c7099fa0c37df88a4c7c1644fcff32356a
parente45b55e6c10ff96c1e1b3105c1e0f51b00cd3a6e (diff)
downloadmaster-187ad058-7fd4ed413fdd3073ab0ceac67a0bd6871fdc3ba7.tar.gz
master-187ad058-7fd4ed413fdd3073ab0ceac67a0bd6871fdc3ba7.tar.bz2
master-187ad058-7fd4ed413fdd3073ab0ceac67a0bd6871fdc3ba7.zip
kernel: improve profiling support, keep static symbols when profiling is enabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30964 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-xscripts/strip-kmod.sh6
-rw-r--r--target/linux/generic/patches-3.2/202-reduce_module_size.patch2
-rw-r--r--target/linux/generic/patches-3.3/202-reduce_module_size.patch2
3 files changed, 7 insertions, 3 deletions
diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh
index 789364f97b..2a75e39821 100755
--- a/scripts/strip-kmod.sh
+++ b/scripts/strip-kmod.sh
@@ -12,7 +12,11 @@ MODULE="$1"
}
ARGS=
-[ -n "$KEEP_SYMBOLS" ] || ARGS="-x -G __this_module --strip-unneeded"
+if [ -n "$KEEP_SYMBOLS" ]; then
+ ARGS="-X --strip-debug"
+else
+ ARGS="-x -G __this_module --strip-unneeded"
+fi
${CROSS}objcopy \
-R .comment \
diff --git a/target/linux/generic/patches-3.2/202-reduce_module_size.patch b/target/linux/generic/patches-3.2/202-reduce_module_size.patch
index f1efb90c37..d12a5e7c0d 100644
--- a/target/linux/generic/patches-3.2/202-reduce_module_size.patch
+++ b/target/linux/generic/patches-3.2/202-reduce_module_size.patch
@@ -5,7 +5,7 @@
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
-KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
-+KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds -s
++KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
diff --git a/target/linux/generic/patches-3.3/202-reduce_module_size.patch b/target/linux/generic/patches-3.3/202-reduce_module_size.patch
index f1efb90c37..d12a5e7c0d 100644
--- a/target/linux/generic/patches-3.3/202-reduce_module_size.patch
+++ b/target/linux/generic/patches-3.3/202-reduce_module_size.patch
@@ -5,7 +5,7 @@
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
-KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
-+KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds -s
++KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds $(if $(CONFIG_PROFILING),,-s)
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)