smbd: Simplify smb_set_file_unix_link()
[Samba.git] / buildtools / scripts / abi_gen.sh
blobc66a1b848a889604b457e7401c90674250fd37ca
1 #!/bin/sh
2 # generate a set of ABI signatures from a shared library
4 SHAREDLIB="$1"
6 GDBSCRIPT="gdb_syms.$$"
9 cat <<EOF
10 set height 0
11 set width 0
12 EOF
14 # On older linker versions _init|_fini symbols are not hidden.
15 objdump --dynamic-syms "${SHAREDLIB}" |
16 awk '$0 !~ /.hidden/ {if ($2 == "g" && $3 ~ /D(F|O)/ && $4 ~ /(.bss|.rodata|.text)/) print $NF}' |
17 sort |
18 while read -r s; do
19 echo "echo $s: "
20 echo p "${s}"
21 done
22 ) >$GDBSCRIPT
24 # forcing the terminal avoids a problem on Fedora12
25 TERM=none gdb -n -batch -x $GDBSCRIPT "$SHAREDLIB" </dev/null
26 rm -f $GDBSCRIPT