Hello,
I'm wondering why I can't find any information on the usage of PGO with
shared libraries.
I found two unanswered questions via google that are pointing in the
direction:
http://www.mailinglistarchive.com/html/gcc@xxxxxxxxxxx/2009-11/msg00679.html
and http://readlist.com/lists/gcc.gnu.org/gcc-help/3/18535.html
My basic setup is simple: gcc 4.5.0 release version (not cvs) and
binutils 2.20 release version (not cvs) with --enable-gold option.
Operating System is Linux Suse 11.2.
As long as I don't flag -fprofile-generate everything is well and my .so
is dlopen()'ed by the main program and works flawlessly. Out of
curiosity I tried PGO with it.
When compiled and linked with -fprofile-generate the library gets
loaded, everything works, but when I end the main program I get a
sigsegv with coredump.
I fed the corefile to gdb and got this:
#0 0x00000000 in ?? ()
No symbol table info available.
#1 0x1f32bc2f in ?? ()
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
And of course no .cdda files are saved.
Any ideas?
Philipp