From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvFR8-0004Wn-SZ for qemu-devel@nongnu.org; Mon, 04 Jun 2007 12:29:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvFR7-0004UA-VG for qemu-devel@nongnu.org; Mon, 04 Jun 2007 12:29:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvFR7-0004Tl-Pk for qemu-devel@nongnu.org; Mon, 04 Jun 2007 12:29:41 -0400 Received: from web54607.mail.re2.yahoo.com ([206.190.49.177]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HvFR6-0007ds-9z for qemu-devel@nongnu.org; Mon, 04 Jun 2007 12:29:41 -0400 Date: Mon, 4 Jun 2007 08:33:38 -0700 (PDT) From: sinisa marovic Subject: Re: [Qemu-devel] Porting QEMU to PalmOS MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2134826817-1180971218=:45217" Message-ID: <748971.45217.qm@web54607.mail.re2.yahoo.com> 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 --0-2134826817-1180971218=:45217 Content-Type: text/plain; charset=ascii Hi, thanks for the tip about position-independent. I did compile with -fno-pic, and the op.h was then generated without error. Now I have a different problem that might be related to PIC. The thing is, because of the nature of PalmOS, I had to link with -fPIC. Now, after removing the faults, I have reached the execution loop in cpu-exec.c and invoking of gen_func, nothing is realy happening, the loop is being executed, but after printing the data at the address of gen_func, I could see that there are all zeroes. Might that be because of linking with -fPIC? If so, I will have to use different way to link it, and it might take a while. If not, where to search for the fault? I have also debugged the host_alarm_handler, and found out that although realtime timer expires, it is not initialized again. Where exactly in the code is it done? I tried to find the place, but those timer functions are structure members, and it is hard to find a place. /Voda ----- Original Message ---- From: Wolfgang Schildbach To: qemu-devel@nongnu.org Sent: Wednesday, May 23, 2007 5:23:51 PM Subject: Re: [Qemu-devel] Porting QEMU to PalmOS Try compiling as position-dependent (i.e. not PIC) code. GOT is a typical feature of position independent code. - Wolfgang qemu-devel-bounces+wolfgang.schildbach=codingtechnologies.com@nongnu.org wrote on 23.05.2007 13:20:22: > Hi Johannes, > > thanks for your quick response. > I thought QEMU was already compiled and run on an ARM machine? > If so, how come that noone else had such problem (I searched for it > on google), > and PXA255 is a standard ARM CPU with a few additional instructions. > And how to make them not come from GOT, those vars are declared as extern, > so they are globals? > > BR, > Voda. > ----- Original Message ---- > From: Johannes Schindelin > To: sinisa marovic > Cc: qemu-devel@nongnu.org > Sent: Wednesday, May 23, 2007 12:48:59 PM > Subject: Re: [Qemu-devel] Porting QEMU to PalmOS > Hi, > > On Wed, 23 May 2007, sinisa marovic wrote: > > > Relocation types that fail are 25 and 26, which are R_ARM_GOTPC and > > R_ARM_GOT32 respectively. Their names are: > > > > _GLOBAL_OFFSET_TABLE_ > > cc_table > > __op_param1 > > __op_param2 > > __op_param3 > > > > Is there a way to fix this? > > The GOT is an offset table. Many CPUs have fixed-size instruction sets, > which means that you cannot easily jump to an absolute address, since the > address alone would already fill up the size. > > Of course, this is a no-no for QEmu, since the _same_ function snippet > will be reused _multiple_ times. So, the address must not come from a GOT, > but be inserted directly into the code. > > I do not remember off-hand how I managed to do this a couple of years ago, > when I worked on a MIPS host, but there _are_ gcc options to avoid a GOT. > > Hth, > Dscho > > > Food fight? Enjoy some healthy debate > in the Yahoo! Answers Food & Drink Q&A. ____________________________________________________________________________________ Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ --0-2134826817-1180971218=:45217 Content-Type: text/html; charset=ascii
Hi,
 
   thanks for the tip about position-independent. I did compile with -fno-pic, and the
op.h was then generated without error. Now I have a different problem that might be
related to PIC. The thing is, because of the nature of PalmOS, I had to link with -fPIC.
Now, after removing the faults, I have reached the execution loop in cpu-exec.c and
invoking of gen_func, nothing is realy happening, the loop is being executed, but after
printing the data at the address of gen_func, I could see that there are all zeroes.
Might that be because of linking with -fPIC? If so, I will have to use different way
to link it, and it might take a while.
If not, where to search for the fault? I have also debugged the host_alarm_handler,
and found out that although realtime timer expires, it is not initialized again. Where exactly
in the code is it done? I tried to find the place, but those timer functions are structure
members, and it is hard to find a place.
 
/Voda
----- Original Message ----
From: Wolfgang Schildbach <Wolfgang.Schildbach@codingtechnologies.com>
To: qemu-devel@nongnu.org
Sent: Wednesday, May 23, 2007 5:23:51 PM
Subject: Re: [Qemu-devel] Porting QEMU to PalmOS

Try compiling as position-dependent (i.e. not PIC) code. GOT is a typical
feature of position independent code.

- Wolfgang

qemu-devel-bounces+wolfgang.schildbach=codingtechnologies.com@nongnu.org
wrote on 23.05.2007 13:20:22:

> Hi Johannes,
>
>    thanks for your quick response.
> I thought QEMU was already compiled and run on an ARM machine?
> If so, how come that noone else had such problem (I searched for it
> on google),
> and PXA255 is a standard ARM CPU with a few additional instructions.
> And how to make them not come from GOT, those vars are declared as
extern,
> so they are globals?
>
> BR,
>    Voda.

> ----- Original Message ----
> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> To: sinisa marovic <sinisamarovic@yahoo.com>
> Cc: qemu-devel@nongnu.org
> Sent: Wednesday, May 23, 2007 12:48:59 PM
> Subject: Re: [Qemu-devel] Porting QEMU to PalmOS

> Hi,
>
> On Wed, 23 May 2007, sinisa marovic wrote:
>
> > Relocation types that fail are 25 and 26, which are R_ARM_GOTPC and
> > R_ARM_GOT32 respectively. Their names are:
> >
> > _GLOBAL_OFFSET_TABLE_
> > cc_table
> > __op_param1
> > __op_param2
> > __op_param3
> >
> > Is there a way to fix this?
>
> The GOT is an offset table. Many CPUs have fixed-size instruction sets,
> which means that you cannot easily jump to an absolute address, since
the
> address alone would already fill up the size.
>
> Of course, this is a no-no for QEmu, since the _same_ function snippet
> will be reused _multiple_ times. So, the address must not come from a
GOT,
> but be inserted directly into the code.
>
> I do not remember off-hand how I managed to do this a couple of years
ago,
> when I worked on a MIPS host, but there _are_ gcc options to avoid a
GOT.
>
> Hth,
> Dscho
>
>
> Food fight? Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A.



We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list. --0-2134826817-1180971218=:45217--