Reputation: 2561
I'm buiding a shared library on Linux, which reference to other library like boost
, CryptoPP
, jsoncpp
. The problem is the final .so file contains function names, in IDA Pro:
I thought it's because linking to dynamic library, so I build boost
static library, but boost
function names still visible.
I tried strip the .so file:
strip my.so
strip --strip-unneeded -x my.so
Still no luck.
Some competitors may reverse engineer my library, how to hide these function names to make it more difficult to crack?
Upvotes: 0
Views: 881
Reputation: 21886
You should
-fvisibility=hidden
(functions which are actually exported should be marked with __attribute__((visibility("default")))
in code-l:libXYZ.a
syntax in LDFLAGS
); of course they need to be present on your system.Upvotes: 0