ltrace doesn't work on binaries linked with the -z now option, which is the default on my Ubuntu 19.10 system. It only works on binaries linked with -z lazy.
Is there any alternative to ltrace that does the same job, but works on now binaries also?
You can use uftrace utility written by Namhyung Kim. It's available as a package in Ubuntu although I built the code from master branch manually to make sure I use the newest vanilla version. Example
main.c:Build with
-z now:ltracedoesn't work:But
uftracedoes:See this thread on project's site on Github: tracing library calls even if it has no PLT #592.