diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2019-07-08 12:36:40 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2019-07-16 14:16:16 +0200 |
commit | 88058c3ce20bb88c2613b9b5ef9aa558bf8440b9 (patch) | |
tree | b7871663aa05c9f3c0d352c50de1b042bfff30c5 /dependencies/analyses/nm-symbols-analysis.sh | |
parent | 65a600332d3fcdbd0c64d096c68678d25a705dac (diff) | |
download | podman-88058c3ce20bb88c2613b9b5ef9aa558bf8440b9.tar.gz podman-88058c3ce20bb88c2613b9b5ef9aa558bf8440b9.tar.bz2 podman-88058c3ce20bb88c2613b9b5ef9aa558bf8440b9.zip |
hack/analyses -> dependencies/analyses
Move the analyses scripts to the dependencies directory to avoid
scattering of the dependency management.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'dependencies/analyses/nm-symbols-analysis.sh')
-rwxr-xr-x | dependencies/analyses/nm-symbols-analysis.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dependencies/analyses/nm-symbols-analysis.sh b/dependencies/analyses/nm-symbols-analysis.sh new file mode 100755 index 000000000..924246715 --- /dev/null +++ b/dependencies/analyses/nm-symbols-analysis.sh @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +if test "$#" -ne 1; then + echo "invalid arguments: usage: $0 path/to/binary" + exit 1 +fi + +DATA=$(go tool nm -size "$1" \ + | awk 'NF==4 {printf "%s\t%s\t%s\n", $2, $3, $4}' \ + | grep -v -P "\t_\t" \ + | grep -P "\tt\t" \ + | awk ' {printf "%s\t\t%s\n", $1, $3} ' \ + ) + +echo "$DATA" |