datasizes(1): gcc/clang support
This commit is contained in:
parent
dd19f8cd07
commit
78a0260993
1 changed files with 7 additions and 1 deletions
|
@ -5,4 +5,10 @@ then echo "Usage: $0 <executable>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nm -d -n $1 | grep ' [bBdD] ' | awk '{ printf "%10ld kB %s\n", ($1-lastpos)/1024, lastname; lastpos=$1; lastname=$3 }' | sort -n
|
if file $1 | grep NSYM >/dev/null 2>&1; then
|
||||||
|
NM="gnm --radix=d"
|
||||||
|
else
|
||||||
|
NM="nm -d"
|
||||||
|
fi
|
||||||
|
|
||||||
|
$NM -n $1 | grep ' [bBdD] [^.]' | awk '{ if (lastpos) printf "%10ld kB %s\n", ($1-lastpos)/1024, lastname; lastpos=$1; lastname=$3 }' | sort -n
|
||||||
|
|
Loading…
Reference in a new issue