Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19NBij-0008QX-3z for qemu-devel@nongnu.org; Tue, 03 Jun 2003 09:20:57 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19NBif-0008Op-Ub for qemu-devel@nongnu.org; Tue, 03 Jun 2003 09:20:55 -0400 Received: from mx01.uni-tuebingen.de ([134.2.3.11]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NBfz-0007jJ-3y for qemu-devel@nongnu.org; Tue, 03 Jun 2003 09:18:07 -0400 Received: from juist (semeai.Informatik.Uni-Tuebingen.De [134.2.15.66]) by mx01.uni-tuebingen.de (8.12.3/8.12.3) with ESMTP id h53DI42X017570 for ; Tue, 3 Jun 2003 15:18:05 +0200 Received: from falk by juist with local (Exim 3.36 #1 (Debian)) id 19NBfv-0000YM-00 for ; Tue, 03 Jun 2003 15:18:03 +0200 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> From: Falk Hueffner Date: 03 Jun 2003 15:18:03 +0200 In-Reply-To: <3EDBF085.6000308@free.fr> Message-ID: <87vfvnjo50.fsf@student.uni-tuebingen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Reply-To: qemu-devel@nongnu.org List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , To: qemu-devel@nongnu.org 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... -- Falk