Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Tag Archives: shared library

gprof works best with static link.

Some of my programs are extremely slow, so I try to use gprof to profile them.
After several test run, only the functions in the executable are profiled but not those from the shared library even both are complied with “-pg”.

HP gprof man mentions that environment LD_PROFILE can be set, it does reveal more functions in fedora, but not in the way I want.

Finally, I found this blog:
and link my programs statically and voila, it works!