summaryrefslogtreecommitdiff
path: root/scripts/bloat-o-meter
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-05-21 10:32:39 +0000
committerBernhard Reutner-Fischer2008-05-21 10:32:39 +0000
commit49bdf28c320bf4e02048eb0cbd115d84b8467cd9 (patch)
treeaf07499ce2d7ac76cd01974b2a076457163b9ffd /scripts/bloat-o-meter
parent6de8994440165e2f30c50d2d7c1f332d9cd649bd (diff)
downloadbusybox-49bdf28c320bf4e02048eb0cbd115d84b8467cd9.zip
busybox-49bdf28c320bf4e02048eb0cbd115d84b8467cd9.tar.gz
- skip empty lines and archive members
Diffstat (limited to 'scripts/bloat-o-meter')
-rwxr-xr-xscripts/bloat-o-meter6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index f6608af..49f5527 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -21,6 +21,12 @@ for f in sys.argv[1], sys.argv[2]:
def getsizes(file):
sym = {}
for l in os.popen("nm --size-sort " + file).readlines():
+ l = l.strip()
+ # Skip empty lines
+ if not len(l): continue
+ # Skip archive members
+ if len(l.split()) == 1 and l.endswith(':'):
+ continue
size, type, name = l[:-1].split()
if type in "tTdDbBrR":
if "." in name: name = "static." + name.split(".")[0]