aboutsummaryrefslogtreecommitdiff
path: root/scripts/find_stray_common_vars
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2015-05-15 10:20:47 +0200
committerBjørn Mork <bjorn@mork.no>2015-05-15 10:20:47 +0200
commit73b16af8feec390afbabd9356d6e5e83c0390838 (patch)
tree3730020ba2f9caeb9d7815a975af51830b51ce11 /scripts/find_stray_common_vars
busybox: imported from http://www.busybox.net/downloads/busybox-1.13.3.tar.bz2busybox-1.13.3
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Diffstat (limited to 'scripts/find_stray_common_vars')
-rwxr-xr-xscripts/find_stray_common_vars10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/find_stray_common_vars b/scripts/find_stray_common_vars
new file mode 100755
index 0000000..3a25d7a
--- /dev/null
+++ b/scripts/find_stray_common_vars
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Common variables are elusive, they don't show up in size output!
+# This script will show all commons in *.o, sorted by size
+
+find ! -path './scripts/*' -a ! -name built-in.o -a -name '*.o' \
+| while read name; do
+ b=`basename "$name"`
+ nm "$name" | sed "s/^/$b: /"
+done | grep -i ' c ' | sort -k2