* [Qemu-devel] enable-gprof configuration option issue?
@ 2015-11-04 16:45 Claudio Fontana
2015-11-05 20:16 ` John Snow
0 siblings, 1 reply; 2+ messages in thread
From: Claudio Fontana @ 2015-11-04 16:45 UTC (permalink / raw)
To: Peter Maydell; +Cc: Ajo Jose Panoor, qemu-devel@nongnu.org
Hello,
we are trying to use good old gprof to profile the QEMU process,
and it seems to work when directly passing "-O0 -pg" using --extra-cflags,
while it does not seem to work when using "--enable-gprof".
The error we get when using --enable-gprof is the following:
ld: gcrt1.o: relocation R_X86_64_32S against `__libc_csu_fini' can not be used when making a shared object; recompile with -fPIC
gcrt1.o: could not read symbols: Bad value
We got this on a few X86 boxes with different distros, in my case I have Slackware-14.1 64bit, ld 2.23.52.0.1.20130226, gcc 4.8.2
Is the expectation that one should pass "-pg" directly?
Thanks!
Ciao,
Claudio
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] enable-gprof configuration option issue?
2015-11-04 16:45 [Qemu-devel] enable-gprof configuration option issue? Claudio Fontana
@ 2015-11-05 20:16 ` John Snow
0 siblings, 0 replies; 2+ messages in thread
From: John Snow @ 2015-11-05 20:16 UTC (permalink / raw)
To: Claudio Fontana, Peter Maydell; +Cc: Ajo Jose Panoor, qemu-devel@nongnu.org
On 11/04/2015 11:45 AM, Claudio Fontana wrote:
> Hello,
>
> we are trying to use good old gprof to profile the QEMU process,
> and it seems to work when directly passing "-O0 -pg" using --extra-cflags,
> while it does not seem to work when using "--enable-gprof".
>
> The error we get when using --enable-gprof is the following:
>
> ld: gcrt1.o: relocation R_X86_64_32S against `__libc_csu_fini' can not be used when making a shared object; recompile with -fPIC
> gcrt1.o: could not read symbols: Bad value
>
> We got this on a few X86 boxes with different distros, in my case I have Slackware-14.1 64bit, ld 2.23.52.0.1.20130226, gcc 4.8.2
>
> Is the expectation that one should pass "-pg" directly?
>
> Thanks!
>
> Ciao,
>
> Claudio
>
>
It looks like our configure script currently only prepends -p when you
specify --enable-gprof, and not -pg. It doesn't appear to set -O0
either; you probably want --enable-debug --enable-gprof.
I'm not very familiar with gprof or the flags that make the most sense
for it, so it might be in your interest to send a patch over to make
this configure option more useful.
--js
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-05 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-04 16:45 [Qemu-devel] enable-gprof configuration option issue? Claudio Fontana
2015-11-05 20:16 ` John Snow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).