kernel: do not rename module symbols with kallsyms enabled
authorFelix Fietkau <nbd@openwrt.org>
Thu, 1 Mar 2012 09:58:03 +0000 (09:58 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 1 Mar 2012 09:58:03 +0000 (09:58 +0000)
SVN-Revision: 30759

rules.mk
scripts/strip-kmod.sh

index 79a2a9fa48cf8d44a50830491c12a7ae01082975..45ef87cb23396919ec3bf05b688816357453fb3e 100644 (file)
--- 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" \
index 68da9e901baa0c36d4a0b8b71e3a94fe6b9ef2cb..57207e3ae6c36e66e9fd11d63ad266263f0ff959 100755 (executable)
@@ -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