1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

info-objsize: Restore info-objsize target

This restores the functionality of the info-objsize target.
This commit is contained in:
Koen Zandberg 2020-10-07 11:30:00 +02:00
parent be93529c89
commit 9006d7ad43
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -14,11 +14,14 @@ info-objsize:
"") SORTROW=4 ;; \
*) echo "Usage: $(MAKE) info-objsize SORTROW=[text|data|bss|dec]" ; return ;; \
esac; \
printf ' text\t data\t bss\t dec\t hex\tfilename\n'; \
$(SIZE) -d -B $(BASELIBS) | \
tail -n+2 | \
sed -e 's#$(BINDIR)##' | \
sort -rnk$${SORTROW}
printf ' text\t data\t bss\t dec\t hex\tmodule\n'; \
for i in $(sort $(BASELIBS:%.module=%)); \
do \
$(SIZE) -t -d -B $(BINDIR)/$$i/*.o 2> /dev/null | \
tail -n1 | \
sed -e "s#(TOTALS)#$$i#" | \
sed -e 's#$(BINDIR)##'; \
done | sort -n -r -k $${SORTROW}
info-buildsize:
@$(SIZE) -d -B $(ELFFILE) || echo ''