Skip to contentSkip to conversation

Porting QEMU to PalmOS

Qemu-devel sinisa marovic 3 participants 4 messages May 23, 2007 – May 24, 2007

lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
To: sinisa marovic <[email protected]>
Cc: [email protected]
Sent: Wednesday, May 23, 2007 12:48:59 PM
Subject: Re: [Qemu-devel] Porting QEMU to PalmOS

Hi,

Quoted 10 lines · sinisa marovic

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

____________________________________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

#1 lore raw

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:

Quoted 8 lines

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,

Quoted 25 lines

so they are globals?

BR,
Voda.

----- Original Message ----
From: Johannes Schindelin <[email protected]>
To: sinisa marovic <[email protected]>
Cc: [email protected]
Sent: Wednesday, May 23, 2007 12:48:59 PM
Subject: Re: [Qemu-devel] Porting QEMU to PalmOS

Hi,

Quoted 9 lines · sinisa marovic

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

Quoted 4 lines
Quoted 1 line

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

Quoted 4 lines

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,

Quoted 3 lines

but be inserted directly into the code.

I do not remember off-hand how I managed to do this a couple of years

ago,

Quoted 1 line

when I worked on a MIPS host, but there _are_ gcc options to avoid a

GOT.

Quoted 7 lines

Hth,
Dscho

Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

#2 lore raw

Wow, if you can make this work I will be thrilled. I <3 my Treo 650.

jonathan

Quoted 70 lines · Wolfgang Schildbach

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:

Quoted 8 lines

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,

Quoted 25 lines

so they are globals?

BR,
Voda.

----- Original Message ----
From: Johannes Schindelin <[email protected]>
To: sinisa marovic <[email protected]>
Cc: [email protected]
Sent: Wednesday, May 23, 2007 12:48:59 PM
Subject: Re: [Qemu-devel] Porting QEMU to PalmOS

Hi,

Quoted 9 lines · sinisa marovic

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

Quoted 4 lines
Quoted 1 line

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

Quoted 4 lines

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,

Quoted 3 lines

but be inserted directly into the code.

I do not remember off-hand how I managed to do this a couple of years

ago,

Quoted 1 line

when I worked on a MIPS host, but there _are_ gcc options to avoid a

GOT.

Quoted 7 lines

Hth,
Dscho

Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

Signature · 3 lines
--
Jonathan Kalbfeld
+1 323 620 6682
#3 lore raw
In reply to Wolfgang Schildbach

One definite plus with having QEMU for PalmOS is the ability to run things like OpenVPN (even if slow) and connect to a VPN back-end.

As is, I use OpenVPN tunnels to link up my QEMU machines on Solaris.

jonathan

Quoted 70 lines · Wolfgang Schildbach

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:

Quoted 8 lines

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,

Quoted 25 lines

so they are globals?

BR,
Voda.

----- Original Message ----
From: Johannes Schindelin <[email protected]>
To: sinisa marovic <[email protected]>
Cc: [email protected]
Sent: Wednesday, May 23, 2007 12:48:59 PM
Subject: Re: [Qemu-devel] Porting QEMU to PalmOS

Hi,

Quoted 9 lines · sinisa marovic

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

Quoted 4 lines
Quoted 1 line

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

Quoted 4 lines

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,

Quoted 3 lines

but be inserted directly into the code.

I do not remember off-hand how I managed to do this a couple of years

ago,

Quoted 1 line

when I worked on a MIPS host, but there _are_ gcc options to avoid a

GOT.

Quoted 7 lines

Hth,
Dscho

Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

Signature · 3 lines
--
Jonathan Kalbfeld
+1 323 620 6682