blob: 09de11407fa319d08234e665be00062a1b5eab47 [file] [log] [blame]
Bernhard Reutner-Fischer06a81d32006-04-26 10:10:25 +00001#!/bin/sh
2
Denis Vlasenko5df955f2007-03-13 13:01:14 +00003t_text=0
4t_data=0
5t_bss=0
6
7printf "%9s %11s %9s %9s %s\n" "text+data" "text+rodata" rwdata bss filename
8
Denis Vlasenkod1a302b2006-12-31 20:40:20 +00009find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \
Denis Vlasenko91f20ab2007-01-20 01:47:44 +000010| sed 's:^\./::' | xargs "${CROSS_COMPILE}size" | grep '^ *[0-9]' \
Denis Vlasenko5df955f2007-03-13 13:01:14 +000011| {
12while read text data bss dec hex filename; do
13 t_text=$((t_text+text))
14 t_data=$((t_data+data))
15 t_bss=$((t_bss+bss))
Bernhard Reutner-Fischer06a81d32006-04-26 10:10:25 +000016 printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename"
Denis Vlasenko5df955f2007-03-13 13:01:14 +000017done
18printf "%9d %11d %9d %9d %s\n" $((t_text+t_data)) $t_text $t_data $t_bss "TOTAL"
19} | sort -r