Commit 51849738 authored by Rob Landley's avatar Rob Landley Committed by Linus Torvalds

[PATCH] bloat-o-meter: gcc-4 fix

Upgrade scripts/bloat-o-meter to handle the names gcc 4 gives static
symbols.
Signed-off-by: default avatarRob Landley <rob@landley.net>
Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f867d2a2
...@@ -18,7 +18,8 @@ def getsizes(file): ...@@ -18,7 +18,8 @@ def getsizes(file):
for l in os.popen("nm --size-sort " + file).readlines(): for l in os.popen("nm --size-sort " + file).readlines():
size, type, name = l[:-1].split() size, type, name = l[:-1].split()
if type in "tTdDbB": if type in "tTdDbB":
sym[name] = int(size, 16) if "." in name: name = "static." + name.split(".")[0]
sym[name] = sym.get(name, 0) + int(size, 16)
return sym return sym
old = getsizes(sys.argv[1]) old = getsizes(sys.argv[1])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment