Skip to content

Commit

Permalink
kernel: improve profiling support, keep static symbols when profiling…
Browse files Browse the repository at this point in the history
… is enabled

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30964 3c298f89-4303-0410-b956-a3cf2f4a3e73
  • Loading branch information
nbd committed Mar 17, 2012
1 parent f7aa21a commit d16a17a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion scripts/strip-kmod.sh
Expand Up @@ -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 \
Expand Down
Expand Up @@ -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)
Expand Up @@ -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)

0 comments on commit d16a17a

Please sign in to comment.