From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BiM0B-0004wk-9m for qemu-devel@nongnu.org; Wed, 07 Jul 2004 19:38:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BiM09-0004tD-AE for qemu-devel@nongnu.org; Wed, 07 Jul 2004 19:38:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiM09-0004tA-7V for qemu-devel@nongnu.org; Wed, 07 Jul 2004 19:38:57 -0400 Received: from [212.16.62.51] (helo=mail.13thfloor.at) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BiLxS-0006dD-Fq for qemu-devel@nongnu.org; Wed, 07 Jul 2004 19:36:10 -0400 Date: Thu, 8 Jul 2004 01:36:07 +0200 From: Herbert Poetzl Subject: Re: [Qemu-devel] dyngen porting - workaround for st_size==0 Message-ID: <20040707233607.GA3446@MAIL.13thfloor.at> References: <12782.194.90.80.211.1089205601.squirrel@194.90.80.211> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12782.194.90.80.211.1089205601.squirrel@194.90.80.211> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alonl@tiranogath.dnsalias.net Cc: qemu-devel@nongnu.org On Wed, Jul 07, 2004 at 04:06:41PM +0300, alonl@tiranogath.dnsalias.net wrote: > Hi, > > I'm compiling qemu using the nisa-elf compiler, a cross compiler for the > BF533, a dsp by analog devices. After some tweaking I managed to compile > dyngen and a bunch of other files, until the point where dyngen is > executed to create op.h and opc.h. > > At that point I get error messages that complain about empty code for > _op_SOMETHING (sorry for no pasted make logs - I'm writing this on a > different machine. btw the added underscore is a change I had to make > since the nisa-elf compiler produces function symbols with that > underscore prepended). I looked into dyngen and found that it was ok, the > problem is that the elf objects that nisa-elf-gcc produces have > sym->st_size == 0! This doesn't prevent them from running at the end, but > it prevents me from compiling qemu.. let alone running it.. > > I can't change the st_size field without hacking the toolchain, which is > very hard - is there any way to make dyngen work without the size field? > will any of the following work: > sort the symbols according to st_value (address), and take the difference > to be the size that the JIT should copy. > or: from st_value look for the RTS opcode (10 00 for the BF533, a 16 bit > instruction processor), assuming there is only one for each function. how about that: define a label at the end of the code, something like _op_SOMETHING_end, and just use/store the difference between this and the _op symbol ... > Any other ideas are appreciated, help! HTH, Herbert > Alon > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel