3 # This script takes a static library and removes all non-public symbols.
4 # Ie, it makes a static lib whose symbols are far less likely to clash with
5 # the symbols of another shared or static library.
7 grep sf_ Symbols.gnu-binutils |
sed -e "s/[ ;]//g" > Symbols.static
9 ld
-r --whole-archive .libs
/libsndfile.a
-o libsndfile_a.o
11 objcopy
--keep-global-symbols=Symbols.static libsndfile_a.o libsndfile.o
14 ar cru libsndfile.a libsndfile.o