qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] kqemu does not build on hybrid x86_64/i386 system


From: Chris Dukes
Subject: [Qemu-devel] kqemu does not build on hybrid x86_64/i386 system
Date: Wed, 29 Oct 2008 13:19:42 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

Hi,
I'm attempting to build kqemu 1.4.0~pre1 on a debian sid i386 system running
debian's 2.6.26-1-amd64 kernel.

It fails attemping to assemble nexus_asm.S with a combination of
x86_64/nexus_asm.S:63: Error: bad register name `%rax'
type errors
and
x86_64/nexus_asm.S:84: Error: `movzwq' is only supported in 64-bit mode

I believe this is happening because the kqemu script makes
extensive use of uname -m to determine the architecture for
build and incorrectly assumes that just because it's x86_64ish
that gcc will emit 64bit code.

After much kludging (And it's incorrect for anything except Linux),
I was able to have common/Makefile apply -m32 or -m64 as I thought was
appropriate.  Now the .S files assemble fine, but link fails with
x86_64/monitor_asm.o: In function `__monitor_exception':
(.text+0x68d): undefined reference to `KQEMU_STATE_monitor_ss_null_sel'
x86_64/monitor_asm.o: In function `exception_return':
(.text+0x6d3): undefined reference to `KQEMU_STATE_monitor_ss_null_sel'
x86_64/monitor_asm.o: In function `exception_return16':
(.text+0x776): undefined reference to `KQEMU_STATE_monitor_cs32_sel'
x86_64/monitor_asm.o: In function `__monitor_interrupt':
(.text+0x81c): undefined reference to `KQEMU_STATE_monitor_ss_null_sel'

It's somewhat confusing as it builds fine for an x86_64 kernel with
x86_64 userspace and 686 kernel with i386 userspace.

Attached are the full logs, as well as my kludgery.
-- 
Chris Dukes

Attachment: fail1.txt
Description: Text document

Attachment: fail2.txt
Description: Text document

Attachment: kqemu.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]