* mips-linux-nat.c (mips64_linux_fetch_registers): Pass `ops' to
[deliverable/binutils-gdb.git] / gprof / gprof.texi
index f389087b7ad6f3c65c84e02ce6a0c6ce420ebbe3..1f86383de7c155b3a2c1223a224de2c9270fcb63 100644 (file)
@@ -325,6 +325,20 @@ example:
 ld -o myprog /lib/gcrt0.o myprog.o utils.o -lc_p
 @end example
 
+If you are running the program on a system which supports shared
+libraries you may run into problems with the profiling support code in
+a shared library being called before that library has been fully
+initialised.  This is usually detected by the program encountering a
+segmentation fault as soon as it is run.  The solution is to link
+against a static version of the library containing the profiling
+support code, which for @code{gcc} users can be done via the
+@samp{-static} or @samp{-static-libgcc} command line option.  For
+example:
+
+@example
+gcc -g -pg -static-libgcc myprog.c utils.c -o myprog
+@end example
+
 If you compile only some of the modules of the program with @samp{-pg}, you
 can still profile the program, but you won't get complete information about
 the modules that were compiled without @samp{-pg}.  The only information
This page took 0.023134 seconds and 4 git commands to generate.