From bf6ed08aaa3611182c5bc9851547584fb56764f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 4 Aug 2015 17:34:18 +0200 Subject: [PATCH] Fix list-symbols.sh - make it work on Linux - use all three libraries --- tests/scripts/list-symbols.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/scripts/list-symbols.sh b/tests/scripts/list-symbols.sh index 82b6cc90b..c25871942 100755 --- a/tests/scripts/list-symbols.sh +++ b/tests/scripts/list-symbols.sh @@ -16,7 +16,11 @@ cp include/mbedtls/config.h include/mbedtls/config.h.bak scripts/config.pl full CFLAGS=-fno-asynchronous-unwind-tables make clean lib >/dev/null 2>&1 mv include/mbedtls/config.h.bak include/mbedtls/config.h -nm -gUj library/libmbedtls.a 2>/dev/null | sed -n -e 's/^_//p' | sort > exported-symbols +if uname | grep -F Darwin >/dev/null; then + nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' +elif uname | grep -F Linux >/dev/null; then + nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' +fi | sort > exported-symbols make clean wc -l exported-symbols