From ba66a4b9614b5c4e84cc266beb5fdfed0d1783a5 Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 1 Mar 2012 15:13:26 +0000 Subject: kernel: keep more symbols in the kernel modules when doing profiling git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30762 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- scripts/strip-kmod.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh index 57207e3ae..789364f97 100755 --- a/scripts/strip-kmod.sh +++ b/scripts/strip-kmod.sh @@ -11,16 +11,18 @@ MODULE="$1" exit 1 } +ARGS= +[ -n "$KEEP_SYMBOLS" ] || ARGS="-x -G __this_module --strip-unneeded" + ${CROSS}objcopy \ - --strip-unneeded \ -R .comment \ -R .pdr \ -R .mdebug.abi32 \ -R .note.gnu.build-id \ -R .gnu.attributes \ -R .reginfo \ - -G __this_module \ - -x "$MODULE" "$MODULE.tmp" + $ARGS \ + "$MODULE" "$MODULE.tmp" [ -n "$NO_RENAME" ] && { mv "${MODULE}.tmp" "$MODULE" -- cgit v1.2.3