mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 04:50:11 +01:00
tools: add script to check library exports against .ver files
This commit is contained in:
parent
a1fac30e6b
commit
235f96d2fd
2 changed files with 26 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
EXTRA_DIST = doc-generator.xsl
|
||||
EXTRA_DIST = doc-generator.xsl check-exports.sh
|
||||
|
|
|
|||
25
tools/check-exports.sh
Executable file
25
tools/check-exports.sh
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
||||
stat=0
|
||||
so=$1
|
||||
def=$2
|
||||
|
||||
# Have to prefix with a tab and suffix with a ';' to match .ver file format
|
||||
get_syms='( objdump -t "$so" | grep "^[^ ]* [^l.*]*[.]"; objdump -t "$so" | grep "[.]hidden.*"; ) | sed "s/.* //" | sed "s/^/\t/" | sed "s/$/;/"'
|
||||
|
||||
echo $so: checking exported symbols against $def
|
||||
|
||||
{
|
||||
echo "{"
|
||||
echo "global:"
|
||||
eval $get_syms | sort -u
|
||||
echo "local:"
|
||||
echo " *;"
|
||||
echo "};"
|
||||
} | diff -u "$def" - >&2 || stat=1
|
||||
|
||||
exit $stat
|
||||
|
||||
Loading…
Add table
Reference in a new issue