summaryrefslogtreecommitdiff
path: root/buildtools/scripts
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-18 12:41:56 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-18 15:00:37 +1000
commit877439e26422568bd5ca6ffc019c3ae1d6c2499c (patch)
tree55d9a4762ee15dfa1cc0c77e022ae493cf398d98 /buildtools/scripts
parentbf45b4f4fda2c4e0d697bb30720c780325c3cd84 (diff)
downloadsamba-877439e26422568bd5ca6ffc019c3ae1d6c2499c.tar.gz
samba-877439e26422568bd5ca6ffc019c3ae1d6c2499c.tar.bz2
samba-877439e26422568bd5ca6ffc019c3ae1d6c2499c.zip
build: added a script for generating ABI signatures from shared libraries
Diffstat (limited to 'buildtools/scripts')
-rwxr-xr-xbuildtools/scripts/abi_gen.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/buildtools/scripts/abi_gen.sh b/buildtools/scripts/abi_gen.sh
new file mode 100755
index 0000000000..fa708dd8e4
--- /dev/null
+++ b/buildtools/scripts/abi_gen.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# generate a set of ABI signatures from a shared library
+
+SHAREDLIB="$1"
+
+GDBSCRIPT="gdb_syms.$$"
+
+(
+cat <<EOF
+set height 0
+set width 0
+EOF
+nm $SHAREDLIB | cut -c18- | egrep '^[DGTRVW]' | grep -v @ | cut -c3- | sort | while read s; do
+ echo "echo $s: "
+ echo p $s
+done
+) > $GDBSCRIPT
+
+gdb -batch -x $GDBSCRIPT $SHAREDLIB < /dev/null
+rm -f $GDBSCRIPT