]> www.infradead.org Git - users/sagi/libnvme.git/commit
build: clean up version script
authorCaleb Sander <csander@purestorage.com>
Wed, 16 Aug 2023 21:20:27 +0000 (15:20 -0600)
committerDaniel Wagner <wagi@monom.org>
Thu, 17 Aug 2023 12:56:12 +0000 (14:56 +0200)
commit20a3fa87520af7f615415091fe9da484b0ac3bd2
treecb0549452c84cdfd68f9c842f367aa28d521ee34
parente1ec9bfcec8f540a32169bb7fb79ae0ee951c9ae
build: clean up version script

Remove symbols from libnvme.map that don't exist in libnvme.so.
These are a mix of static inline functions,
static (unexported) functions, nonexistent functions, and types.
Also remove a couple of duplicate symbols.

Bash script to find unexported symbols:
for symbol in `grep -o nvm[ef]_[a-z0-9_]* src/libnvme.map`
do
    if nm -D .build/src/libnvme.so | grep $symbol$ > /dev/null
    then
        true
    else
        echo $symbol
    fi
done

Bash command to find duplicated symbols:
grep nvm src/libnvme.map | uniq -c | grep -v '^\s*1 '

Signed-off-by: Caleb Sander <csander@purestorage.com>
src/libnvme.map