This question was answered here. I'll post a summary.
The uftrace utility is a valid alternative to ltrace that works on binaries linked with
-z now. Below is a demonstration.
int main(int argc, char const *argv)
We'll be using the above hello world program for demonstration purposes.
sumit@HAL9000:~$ gcc hello.c -o hello -Wl,-z,now
sumit@HAL9000:~$ ltrace ./hello
+++ exited (status 0) +++
sumit@HAL9000:~$ uftrace --force -a ./hello
# DURATION TID FUNCTION
187.291 us [ 40352] | puts("Hello world!") = 13;
As we can see above,
ltrace didn't work on the program when it was compiled with
-z now, but