aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules.mk2
-rwxr-xr-xscripts/strip-kmod.sh5
2 files changed, 6 insertions, 1 deletions
diff --git a/rules.mk b/rules.mk
index 79a2a9fa48..45ef87cb23 100644
--- a/rules.mk
+++ b/rules.mk
@@ -219,7 +219,7 @@ else
endif
endif
RSTRIP:= \
- export CROSS="$(TARGET_CROSS)"; \
+ export CROSS="$(TARGET_CROSS)" $(if $(CONFIG_KERNEL_KALLSYMS),NO_RENAME=1); \
NM="$(TARGET_CROSS)nm" \
STRIP="$(STRIP)" \
STRIP_KMOD="$(SCRIPT_DIR)/strip-kmod.sh" \
diff --git a/scripts/strip-kmod.sh b/scripts/strip-kmod.sh
index 68da9e901b..57207e3ae6 100755
--- a/scripts/strip-kmod.sh
+++ b/scripts/strip-kmod.sh
@@ -22,6 +22,11 @@ ${CROSS}objcopy \
-G __this_module \
-x "$MODULE" "$MODULE.tmp"
+[ -n "$NO_RENAME" ] && {
+ mv "${MODULE}.tmp" "$MODULE"
+ exit 0
+}
+
${CROSS}nm "$MODULE.tmp" | awk '
BEGIN {
n = 0