From: Paolo Bonzini <pbonzini@redhat.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"Frediano Ziglio" <frediano.ziglio@citrix.com>,
"Anthony Liguori" <anthony@codemonkey.ws>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [Xen-devel] Project idea: make QEMU more flexible
Date: Tue, 04 Feb 2014 05:32:35 +0100 [thread overview]
Message-ID: <52F06D63.8090003@redhat.com> (raw)
In-Reply-To: <20140123162329.GG24675@zion.uk.xensource.com>
Il 23/01/2014 17:23, Wei Liu ha scritto:
> On Thu, Jan 23, 2014 at 01:54:40PM +0000, Wei Liu wrote:
>> On Thu, Jan 23, 2014 at 10:11:57AM +0100, Paolo Bonzini wrote:
>>> Il 22/01/2014 17:09, Wei Liu ha scritto:
>>>> On Wed, Jan 22, 2014 at 11:20:38AM +0100, Paolo Bonzini wrote:
>>>>> Il 21/01/2014 19:27, Wei Liu ha scritto:
>>>>>>>>
>>>>>>>> Googling "disable tcg" would have provided an answer, but the patches
>>>>>>>> were old enough to be basically useless. I'll refresh the current
>>>>>>>> version in the next few days. Currently I am (or try to be) on
>>>>>>>> vacation, so I cannot really say when, but I'll do my best. :)
>>>>>>>>
>>>>>> Hi Paolo, any update?
>>>>>
>>>>> Oops, sorry, I thought I had sent that out. It's in the disable-tcg
>>>>> branch on my github repository.
>>>>>
>>>>
>>>> Unfortunately your branch didn't work when I enabled TCG support. If I
>>>> use "--disable-tcg" with configure then it works fine.
>>>
>>> Branch fixed.
>>>
>>
>> Yes, it's fixed for the case I reported. Thanks.
>>
>> But it is now broken with following rune:
>> ./configure --enable-kvm --disable-tcg --target-list=i386-softmmu
>> --disable-xen --enable-debug
>>
>> LINK i386-softmmu/qemu-system-i386
>> cpus.o: In function `cpu_signal':
>> /local/scratch/qemu/cpus.c:569: undefined reference to `exit_request'
>> cpus.o: In function `tcg_cpu_exec':
>> /local/scratch/qemu/cpus.c:1257: undefined reference to `cpu_x86_exec'
>> cpus.o: In function `tcg_exec_all':
>> /local/scratch/qemu/cpus.c:1282: undefined reference to `exit_request'
>> /local/scratch/qemu/cpus.c:1299: undefined reference to `exit_request'
>> exec.o: In function `tlb_reset_dirty_range_all':
>> /local/scratch/qemu/exec.c:736: undefined reference to
>> `cpu_tlb_reset_dirty_all'
>> collect2: error: ld returned 1 exit status
>> make[1]: *** [qemu-system-i386] Error 1
>> make: *** [subdir-i386-softmmu] Error 2
>>
>> --enable-debug is the one to blame. Without that it links successfully.
>>
>> Wei.
>>
>
> Finally I figured out what was wrong. Your patch series was relying on
> compiler to aggresively optimize away unused code.
>
> So when --enable-debug is set, compiler won't optimize away the dead
> code, hence those undefine references. With any optimization option -O
> you series compiles successfully.
>
> Feel free to integrate my patch below, or fix those errors in the way
> you see appropriate.
Thanks! I added stubs for all three undefined symbols in tcg-stub.c.
Another way to fix it would be -ffunction-sections/-Wl,--gc-sections
(which shaves 200k more out of the .text section), but that breaks glibc
static linking.
Paolo
next prev parent reply other threads:[~2014-02-04 4:32 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 12:54 [Qemu-devel] Project idea: make QEMU more flexible Wei Liu
2014-01-06 13:23 ` Peter Crosthwaite
2014-01-06 13:23 ` Peter Crosthwaite
2014-01-06 15:11 ` Wei Liu
2014-01-06 16:32 ` Peter Maydell
2014-01-06 16:32 ` Peter Maydell
2014-01-06 17:34 ` Stefano Stabellini
2014-01-06 17:34 ` Stefano Stabellini
2014-01-06 18:06 ` Peter Maydell
2014-01-07 13:26 ` Stefano Stabellini
2014-01-07 13:35 ` Peter Maydell
2014-01-07 13:35 ` Peter Maydell
2014-01-07 13:50 ` Paolo Bonzini
2014-01-07 13:50 ` [Qemu-devel] " Paolo Bonzini
2014-01-07 14:34 ` Stefano Stabellini
2014-01-07 14:34 ` Stefano Stabellini
2014-01-07 14:38 ` [Qemu-devel] " Wei Liu
2014-01-07 14:40 ` Paolo Bonzini
2014-01-07 14:40 ` Paolo Bonzini
2014-01-07 14:38 ` Wei Liu
2014-01-07 15:11 ` [Qemu-devel] " Peter Maydell
2014-01-07 15:34 ` Paolo Bonzini
2014-01-07 15:34 ` Paolo Bonzini
2014-01-07 15:11 ` Peter Maydell
2014-01-07 13:26 ` [Qemu-devel] " Stefano Stabellini
2014-01-06 18:06 ` Peter Maydell
2014-01-06 15:11 ` Wei Liu
2014-01-06 13:25 ` Frediano Ziglio
2014-01-06 13:25 ` [Qemu-devel] [Xen-devel] " Frediano Ziglio
2014-01-06 14:17 ` Stefano Stabellini
2014-01-06 14:17 ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2014-01-06 14:21 ` [Qemu-devel] " Peter Maydell
2014-01-06 14:21 ` [Qemu-devel] [Xen-devel] " Peter Maydell
2014-01-06 14:27 ` [Qemu-devel] " Anthony Liguori
2014-01-06 14:27 ` [Qemu-devel] [Xen-devel] " Anthony Liguori
2014-01-06 14:54 ` Stefano Stabellini
2014-01-06 15:04 ` [Qemu-devel] " Peter Maydell
2014-01-06 15:04 ` [Qemu-devel] [Xen-devel] " Peter Maydell
2014-01-06 20:59 ` Paolo Bonzini
2014-01-06 20:59 ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2014-01-06 15:39 ` [Qemu-devel] " Anthony Liguori
2014-01-06 15:39 ` [Qemu-devel] [Xen-devel] " Anthony Liguori
2014-01-06 15:57 ` Stefano Stabellini
2014-01-06 17:49 ` [Qemu-devel] " Anthony Liguori
2014-01-06 17:49 ` [Qemu-devel] [Xen-devel] " Anthony Liguori
2014-01-06 18:04 ` [Qemu-devel] " Stefano Stabellini
2014-01-06 18:04 ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2014-01-06 15:57 ` [Qemu-devel] " Stefano Stabellini
2014-01-06 18:00 ` [Qemu-devel] [Xen-devel] " Andreas Färber
2014-01-06 20:53 ` Paolo Bonzini
2014-01-07 12:34 ` [Qemu-devel] " Wei Liu
2014-01-07 12:34 ` [Qemu-devel] [Xen-devel] " Wei Liu
2014-01-07 13:32 ` Paolo Bonzini
2014-01-07 13:32 ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2014-01-07 13:37 ` Wei Liu
2014-01-07 13:37 ` [Qemu-devel] [Xen-devel] " Wei Liu
2014-01-21 18:27 ` Wei Liu
2014-01-21 18:27 ` [Qemu-devel] [Xen-devel] " Wei Liu
2014-01-22 10:20 ` Paolo Bonzini
2014-01-22 10:20 ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2014-01-22 12:09 ` Wei Liu
2014-01-22 12:09 ` Wei Liu
2014-01-22 16:09 ` [Qemu-devel] [Xen-devel] " Wei Liu
2014-01-23 9:11 ` Paolo Bonzini
2014-01-23 9:11 ` [Qemu-devel] [Xen-devel] " Paolo Bonzini
2014-01-23 13:54 ` Wei Liu
2014-01-23 16:23 ` Wei Liu
2014-01-23 16:23 ` [Qemu-devel] [Xen-devel] " Wei Liu
2014-02-04 4:32 ` Paolo Bonzini [this message]
2014-02-04 4:32 ` Paolo Bonzini
2014-01-23 13:54 ` Wei Liu
2014-01-22 16:09 ` Wei Liu
2014-01-06 20:53 ` [Qemu-devel] " Paolo Bonzini
2014-01-06 18:00 ` Andreas Färber
2014-01-06 14:54 ` Stefano Stabellini
2014-01-06 13:30 ` Peter Maydell
2014-01-06 15:12 ` Wei Liu
2014-01-06 15:12 ` Wei Liu
2014-01-06 18:12 ` Andreas Färber
2014-01-06 18:25 ` Wei Liu
2014-01-06 18:25 ` Wei Liu
2014-01-07 13:10 ` Stefano Stabellini
2014-01-07 13:10 ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52F06D63.8090003@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=frediano.ziglio@citrix.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.