- skip empty lines and archive members

This commit is contained in:
Bernhard Reutner-Fischer 2008-05-21 10:32:39 +00:00
parent 6de8994440
commit 49bdf28c32

View File

@ -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]