From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IskuG-0007WF-OU for qemu-devel@nongnu.org; Thu, 15 Nov 2007 15:01:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IskuF-0007Tw-9a for qemu-devel@nongnu.org; Thu, 15 Nov 2007 15:01:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IskuE-0007Th-V5 for qemu-devel@nongnu.org; Thu, 15 Nov 2007 15:01:43 -0500 Received: from nf-out-0910.google.com ([64.233.182.190]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IskuE-0005ji-FT for qemu-devel@nongnu.org; Thu, 15 Nov 2007 15:01:42 -0500 Received: by nf-out-0910.google.com with SMTP id 30so625146nfu for ; Thu, 15 Nov 2007 12:01:41 -0800 (PST) Message-ID: Date: Thu, 15 Nov 2007 22:01:41 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] Alpha build failure: dyngen picking out a nameless symbol In-Reply-To: <473A9DED.6020308@shaddybaddah.name> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <473A9DED.6020308@shaddybaddah.name> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 11/14/07, Shaddy Baddah wrote: > Hi, > > I am building qemu from CVS, on a sun4u machine. I have used the > following configure command to ensure a sun4m userland build: > > ../qemu/configure --prefix=/opt/qemu-cvs --sparc_cpu=v8 > > I get the following message confirming the use of GCC 3: > > Looking for gcc 3.x > Found "gcc-3.4" > > Eventually, I get the error I have included at the base of this email. I > have attached the op.h generated. As you will be able to see from the > line below, a nameless symbol is being referenced (after the &): > > op.h:24: *(uint32_t *)(gen_code_ptr + 0) = ((*(uint32_t > *)(gen_code_ptr + 0)) & ~0x3fffff) | ((((long)(&) + 0) >> 10) & 0x3fffff); > > ^ > I've followed the dyngen code as best as I can, and AFAICT that code is > right. The symbol referenced is nameless in the ELF symbol table. The problem is in op_reset_FT0. Source is like this: void OPPROTO glue(op_reset_FT, REG) (void) { glue(FT, REG) = 0; RETURN(); } The code generated for op_reset_FT0 is like this: .section .rodata.cst8,"aM",@progbits,8 .align 8 .LLC0: .long 0 .long 0 .section ".text" .align 4 .global op_reset_FT0 .type op_reset_FT0, #function .proc 020 op_reset_FT0: .LLFB152: .loc 1 30 0 !#PROLOGUE# 0 !#PROLOGUE# 1 .loc 1 31 0 sethi %hi(.LLC0), %g1 ldd [%g1+%lo(.LLC0)], %f8 std %f8, [%g6+1176] .loc 1 32 0 nop retl nop .LLFE152: .size op_reset_FT0, .-op_reset_FT0 So gcc puts the zero constant to .rodata.cst8 and generates code to load the zero value from this location. This method is not supported by dyngen for Sparc, but ARM uses similar method for all (?) constants.