X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fgen-version-script.sh;h=847700114ef8df1f634db307dd22423c655c90e8;hp=ec801966f97e406aebd1d221e092f118d80d868c;hb=882ccb7e49fa8cca9d498c3eda0fbb64ea57d348;hpb=4b55df85348c4ad4129bf6a9af052231f1d6716e diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh index ec801966..84770011 100644 --- a/lib/gen-version-script.sh +++ b/lib/gen-version-script.sh @@ -1,3 +1,4 @@ +set -eu # we go through a bit of work to get the unmangled names of the # typeinfo symbols because of @@ -12,7 +13,7 @@ HEADER=$1 shift printf '{\nglobal:\n' -nm --defined $* | awk '$3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \ +nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \ while read sym; do demangled=$(c++filt $sym) case $demangled in @@ -23,5 +24,6 @@ while read sym; do ;; esac done +nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^(getline|getdelim|canonicalize_file_name)$" {print $3 ";"}' sed -n 's/^[[:space:]]*\(notmuch_[a-z_]*\)[[:space:]]*(.*/ \1;/p' $HEADER printf "local: *;\n};\n"