is there a work around for gprof with shared library?

Andreas Jaeger aj@suse.de
Mon Apr 9 09:27:00 GMT 2001


Alberto Lutgardo <alutgard@brocade.com> writes:

> I am using the following software:
> 
> Linux 2.4.1-mvista-010301
> gcc version 2.95.3
> ld version 2.10.1
> gprof 2.10.1
> 
> Problem:
> 
> gprof is not working with shared library. I like some directions for a work around or how to fix it if there is not a big deal?

If you're using glibc 2.1 or newer, try the following to profile
libc.so.6:

$ LD_PROFILE=libc.so.6 ls
$ sprof libc.so.6 libc.so.6.profile

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Binutils mailing list