2015-07-27 20:42:32 +02:00
|
|
|
set -eu
|
2011-07-16 20:59:44 +02:00
|
|
|
|
|
|
|
# we go through a bit of work to get the unmangled names of the
|
|
|
|
# typeinfo symbols because of
|
|
|
|
# http://sourceware.org/bugzilla/show_bug.cgi?id=10326
|
|
|
|
|
|
|
|
if [ $# -lt 2 ]; then
|
|
|
|
echo Usage: $0 header obj1 obj2 obj3
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
|
|
|
|
HEADER=$1
|
|
|
|
shift
|
|
|
|
|
|
|
|
printf '{\nglobal:\n'
|
2011-09-05 04:50:36 +02:00
|
|
|
nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \
|
2011-07-16 20:59:44 +02:00
|
|
|
while read sym; do
|
|
|
|
demangled=$(c++filt $sym)
|
|
|
|
case $demangled in
|
2016-05-28 19:45:31 +02:00
|
|
|
typeinfo*)
|
2011-07-16 20:59:44 +02:00
|
|
|
printf "\t$sym;\n"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2014-04-09 13:24:02 +02:00
|
|
|
nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^(getline|getdelim|canonicalize_file_name)$" {print $3 ";"}'
|
2011-08-21 21:45:00 +02:00
|
|
|
sed -n 's/^[[:space:]]*\(notmuch_[a-z_]*\)[[:space:]]*(.*/ \1;/p' $HEADER
|
2011-07-16 20:59:44 +02:00
|
|
|
printf "local: *;\n};\n"
|