diff options
author | Bjørn Mork <bjorn@mork.no> | 2015-05-15 10:20:47 +0200 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2015-05-15 10:20:47 +0200 |
commit | 73b16af8feec390afbabd9356d6e5e83c0390838 (patch) | |
tree | 3730020ba2f9caeb9d7815a975af51830b51ce11 /scripts/objsizes |
busybox: imported from http://www.busybox.net/downloads/busybox-1.13.3.tar.bz2busybox-1.13.3
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Diffstat (limited to 'scripts/objsizes')
-rwxr-xr-x | scripts/objsizes | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/objsizes b/scripts/objsizes new file mode 100755 index 0000000..09de114 --- /dev/null +++ b/scripts/objsizes @@ -0,0 +1,19 @@ +#!/bin/sh + +t_text=0 +t_data=0 +t_bss=0 + +printf "%9s %11s %9s %9s %s\n" "text+data" "text+rodata" rwdata bss filename + +find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \ +| sed 's:^\./::' | xargs "${CROSS_COMPILE}size" | grep '^ *[0-9]' \ +| { +while read text data bss dec hex filename; do + t_text=$((t_text+text)) + t_data=$((t_data+data)) + t_bss=$((t_bss+bss)) + printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename" +done +printf "%9d %11d %9d %9d %s\n" $((t_text+t_data)) $t_text $t_data $t_bss "TOTAL" +} | sort -r |