1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-26 17:18:41 +02:00
audacity/lib-src/libsndfile/src/make-static-lib-hidden-privates.sh
2011-04-03 03:08:57 +00:00

15 lines
472 B
Bash
Executable File

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