Bernhard Reutner-Fischer | 06a81d3 | 2006-04-26 10:10:25 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Denis Vlasenko | 5df955f | 2007-03-13 13:01:14 +0000 | [diff] [blame] | 3 | t_text=0 |
| 4 | t_data=0 |
| 5 | t_bss=0 |
| 6 | |
| 7 | printf "%9s %11s %9s %9s %s\n" "text+data" "text+rodata" rwdata bss filename |
| 8 | |
Denis Vlasenko | d1a302b | 2006-12-31 20:40:20 +0000 | [diff] [blame] | 9 | find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \ |
Denis Vlasenko | 91f20ab | 2007-01-20 01:47:44 +0000 | [diff] [blame] | 10 | | sed 's:^\./::' | xargs "${CROSS_COMPILE}size" | grep '^ *[0-9]' \ |
Denis Vlasenko | 5df955f | 2007-03-13 13:01:14 +0000 | [diff] [blame] | 11 | | { |
| 12 | while 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-Fischer | 06a81d3 | 2006-04-26 10:10:25 +0000 | [diff] [blame] | 16 | printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename" |
Denis Vlasenko | 5df955f | 2007-03-13 13:01:14 +0000 | [diff] [blame] | 17 | done |
| 18 | printf "%9d %11d %9d %9d %s\n" $((t_text+t_data)) $t_text $t_data $t_bss "TOTAL" |
Denis Vlasenko | 928b2c0 | 2008-12-01 12:38:36 +0000 | [diff] [blame] | 19 | } | env -uLANG -uLC_ALL sort -r |