I'm going to ship a to static library to a customer. To maximize the privacy of the library I have restricted symbols for the static library using the technique provided by @ypsu Symbol hiding in static libraries built with Xcode
However, the above mentioned method only restrict the user from calling the hidden functions, the name of the hidden function names are still visible to "nm" or "strings".
The names for hidden function are very sensitive. How do I hide or remove this information from the static library ?
I have lately approached the same problem. I decided to rename all public symbols to it's md5sum so that the names are not visible to the user, including the filenames. A following example tries to demonstrate it:
The
./compile.shscript would output:The
privsymbol was renamed tonamespace_6b2f60f631c17ca910498adb47387adfand source files were combined into oneb8c84a861a264dfcb24ebf32892484dd.oobject file withld -relocatable. I am open to more suggestions on how to improve such script.The template shown emerged into a bigger script ,ar_hide_symbols.