symbols-test 505 Bytes
Newer Older
1
2
3
4
5
6
7
8
#! /bin/sh

# Check that all exported symbols use the nettle prefix.

if [ -z "$srcdir" ] ; then
  srcdir=`pwd`
fi

Niels Möller's avatar
Niels Möller committed
9
10
11
# nm on aix seems to generate bogus outbut including random binary data.
# Using -g is a workaround to get rid of that. Hope nm -g is portable enough.
nm -g ../libnettle.a | grep ' [DRT] ' | egrep -v '( |^)\.?_?(_?nettle_|memxor)' \
12
13
14
15
16
17
18
19
20
    | sort -k3 > test1.out

if [ -s test1.out ] ; then
    echo Exported symbols lacking the nettle prefix:
    cat test1.out
    exit 1
else
    exit 0
fi