From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Nh4y-0002lc-Vb for qemu-devel@nongnu.org; Wed, 04 Jun 2003 18:50:00 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Nh37-0001dQ-KV for qemu-devel@nongnu.org; Wed, 04 Jun 2003 18:48:06 -0400 Received: from smtp6.wanadoo.fr ([193.252.22.28] helo=mwinf0302.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Ngyf-0000I6-B7 for qemu-devel@nongnu.org; Wed, 04 Jun 2003 18:43:29 -0400 Received: from free.fr (unknown [81.53.133.197]) by mwinf0302.wanadoo.fr (SMTP Server) with ESMTP id 2CDB8C000238 for ; Thu, 5 Jun 2003 00:43:28 +0200 (CEST) Message-ID: <3EDE7609.80306@free.fr> Date: Thu, 05 Jun 2003 00:43:21 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] QEMU 0.2 is out References: <3ED409D1.6040109@free.fr> <873city82h.fsf@student.uni-tuebingen.de> <3EDBD53F.603@free.fr> <874r386p8k.fsf@student.uni-tuebingen.de> <3EDBF085.6000308@free.fr> <87vfvnjo50.fsf@student.uni-tuebingen.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , To: qemu-devel@nongnu.org With gcc 3.3 and binutils 2.14.90.0.4 it is better. I fixed some bugs related to the new jump optimisation I introduced. But there is a big problem: no relocations are generated for calls to global functions if they are in the same file as the function call. I am trying various patches for this. Fabrice. Falk Hueffner wrote: > Fabrice Bellard writes: > > >>Which version of gcc are you using ? Do you use a patched gcc ? Can >>you give me your spec file and the gcc -v log when you compile >>op-i386.c ? > > > I use gcc 3.3 or 3.4 snapshots usually. > > >>I am totally unable to get correct code. In particular, I cannot make >>gcc 3.2.3 generate R_ALPHA_BRADDR relocations. Currently, to get >>correct code, I must do the following: >> >>-- >>int __op_param1; >>#define PARAM1 ({ int _r; asm("ldah %0,__op_param1($29) !gprelhigh\n" \ >> "lda %0,__op_param1(%0) !gprellow" : >> "=r"(_r) ); _r; }) > > > Ah yes, this is because gcc 3.2.3 doesn't support visibility("hidden") > yet. If a symbol has global visibility, gcc cannot know it is accessed > with the same gp, since it might be provided by libc for example. I > don't think there's any better way do this with 3.2.3. > > >>#define CALL(x) asm volatile ("bsr $26, %0" : : "i" (x)) >>-- >>and use the macro CALL to call a function! > > > This seems to works for me even with 3.2.3. What happens if you don't > use the macro? Maybe your binutils is too old? I have 2.14.90.0.4-0.1. > > Also, concerning the signal handler, siginfo is only filled in with > 2.4.20 and newer kernels... > -- Fabrice.