The library can check its own code when it loads, and virtualized code checks its runtime before it runs, so a modified copy stops.
Optional: at start-up the library refuses to run while it is being traced, or when that cannot be checked.
Rewrites the functions you pick into equivalent native code that is hard to analyze, with little effect on performance.
Debug information and internal symbols are removed; on Android, read-only data and imported calls can be protected as well.
Core functions are turned into private byte-code and run inside an embedded virtual machine.
Executable code can be compressed and kept in authenticated storage; virtualized byte-code is compressed and sealed on every platform.