From: Niels Möller Date: Mon, 14 Jan 2002 14:59:26 +0000 (+0100) Subject: New file. X-Git-Tag: nettle_1.5_release_20020131~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=940734e1eeace5e840cb982cf9a5ac2cf94e1ddf;p=thirdparty%2Fnettle.git New file. Rev: src/nettle/list-obj-sizes.awk:1.1 --- diff --git a/list-obj-sizes.awk b/list-obj-sizes.awk new file mode 100755 index 00000000..b9093a27 --- /dev/null +++ b/list-obj-sizes.awk @@ -0,0 +1,25 @@ +#! /usr/bin/gawk -f + +# Run this filter on the output of +# +# objdump -h libnettle.a + +BEGIN { + print "file text-size data-size rodata-size"; + text_total = 0; + data_total = 0; + rodata_total = 0; +} + +/elf32/ { name = $1; text_size = data_size = rodata_size = 0; } +/\.text/ { text_size = $3 } +/\.data/ { data_size = $3; } +/\.rodata/ { rodata_size = $3; } +/\.comment/ { + printf "%15s %s %s %s\n", name, text_size, data_size, rodata_size; +} + +END { + printf "%15s %s %s %s\n", "TOTAL", text_total, data_total, rodata_total; +} +