Ulrich Klauer - 2013-03-08

This can, in principle, be easily done via libtool's -export-symbols-regex option ("-export-symbols-regex '^sox_'").

However, SoX-the-application uses several internal functions (see "nm -Du `which sox` | grep lsx_"), and the modules built via --with-whatever=dyn some more. Therefore, the regex to use is more like: "^(sox_.*|lsx_(check_read_params|(close|open)_dllibrary|(debug(_more|_most)?|fail|report|warn)_impl|eof|fail_errno|filelength|find_(enum_(text|value)|file_extension)|getopt(_init)?|lpc10_(create_(de|en)coder_state|(de|en)code)|raw(read|write)|read(_b_buf|buf|chars)|realloc|rewind|seeki|sigfigs3p?|strcasecmp|tell
|unreadb|write(b|_b_buf|buf|s)))$"
Still, this hides about 90% of the private symbols, so I think I will actually add this, as a step in the right direction.

To deal with the rest, we'd need to create a self-contained helper library that can be linked (statically) into the modules, and into SoX-the-application. But it is probably difficult to make it self-contained, as those functions in turn call more internal functions, etc.