[PATCH] Small patch to bloat-o-meter.

From: Rob Landley
Date: Sun May 07 2006 - 15:59:16 EST


Workaround for the fact that gcc 4.x no longer provides consistent names for
static symbols.

Signed-off-by: Rob Landley <rob@xxxxxxxxxxx>
---

When I added bloat-o-meter to busybox, I had to fix this to get useful
results. Since the kernel version seems to be the master, I thought you
might be interested.

--- linux-old/scripts/bloat-o-meter 2006-05-07 15:47:23.000000000 -0400
+++ linux-2.6.16/scripts/bloat-o-meter 2006-05-07 15:08:31.000000000 -0400
@@ -18,7 +18,9 @@
for l in os.popen("nm --size-sort " + file).readlines():
size, type, name = l[:-1].split()
if type in "tTdDbB":
- sym[name] = int(size, 16)
+ if name.find(".") != -1: name = "static." + name.split(".")[0]
+ if name in sym: sym[name] += int(size, 16)
+ else :sym[name] = int(size, 16)
return sym

old = getsizes(sys.argv[1])


--
Never bet against the cheap plastic solution.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/