X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fgen-version-script.sh;h=5621f2a9fd85d35feaa7985898a2a67f5fe9ee51;hb=13a59c4a8fc4ee418424e0b7ee4c8bbd5aae5da2;hp=76670d57497a73d33961180d7c8fefb82ec60e59;hpb=9db21452721356be5169254cd7e8c0ec5b25066b;p=notmuch diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh index 76670d57..5621f2a9 100644 --- a/lib/gen-version-script.sh +++ b/lib/gen-version-script.sh @@ -1,7 +1,8 @@ +set -eu # 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 +# https://sourceware.org/bugzilla/show_bug.cgi?id=10326 if [ $# -lt 2 ]; then echo Usage: $0 header obj1 obj2 obj3 @@ -16,13 +17,13 @@ nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3 while read sym; do demangled=$(c++filt $sym) case $demangled in - typeinfo*) + typeinfo*) printf "\t$sym;\n" ;; *) ;; esac done -nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^get(line|delim)$" {print $3 ";"}' +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"