3
0

objsizes 558 B

12345678910111213141516171819
  1. #!/bin/sh
  2. t_text=0
  3. t_data=0
  4. t_bss=0
  5. printf "%9s %11s %9s %9s %s\n" "text+data" "text+rodata" rwdata bss filename
  6. find -name '*.o' | grep -v '^\./scripts/' | grep -vF built-in.o \
  7. | sed 's:^\./::' | xargs "${CROSS_COMPILE}size" | grep '^ *[0-9]' \
  8. | {
  9. while read text data bss dec hex filename; do
  10. t_text=$((t_text+text))
  11. t_data=$((t_data+data))
  12. t_bss=$((t_bss+bss))
  13. printf "%9d %11d %9d %9d %s\n" $((text+data)) $text $data $bss "$filename"
  14. done
  15. printf "%9d %11d %9d %9d %s\n" $((t_text+t_data)) $t_text $t_data $t_bss "TOTAL"
  16. } | sort -r