Hi,
I recently rolled out a new Toolchain on Linux, with gcc 4.5.0 and binutils 2.20 with gold. Now I was curious about this new thing PGO. While it's clear how it works with executables, I've not been able to find an answer on shared libraries. I found two unanswered posts on the gcc mailing list via google, that's all.
So here's what I tried: 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. 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