summaryrefslogtreecommitdiff
path: root/scripts/find_stray_common_vars
blob: 9f26bc7ac68c17b8741cbd4479b8c3c7ac3f13ca (plain)
1
2
3
4
5
6
7
8
9
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 -name '*.o' \
| while read name; do
    b=`basename "$name"`
    nm "$name" | sed "s/^/$b: /"
done | grep -i ' c ' | sort -k2