Skip to content
Snippets Groups Projects
Commit 236dd9d9 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

kernel: keep more symbols in the kernel modules when doing profiling

SVN-Revision: 30762
parent edc3ad91
No related branches found
No related tags found
No related merge requests found
......@@ -220,7 +220,9 @@ else
endif
endif
RSTRIP:= \
export CROSS="$(TARGET_CROSS)" $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1); \
export CROSS="$(TARGET_CROSS)" \
$(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1) \
$(if $(CONFIG_KERNEL_PROFILING),KEEP_SYMBOLS=1); \
NM="$(TARGET_CROSS)nm" \
STRIP="$(STRIP)" \
STRIP_KMOD="$(SCRIPT_DIR)/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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment