qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] RFC: ARM prologue linkage fix
@ 2008-07-08 19:25 Blue Swirl
  2008-07-08 20:43 ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2008-07-08 19:25 UTC (permalink / raw)
  To: qemu-devel, Paul Brook

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

Hi,

I made a patch which allows sparc-linux-user target to be linked on an
ARM host. Is this OK? Sparc32 helloworld program runs successfully,
otherwise untested.

[-- Attachment #2: fix_arm_prologue.diff --]
[-- Type: plain/text, Size: 1196 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] RFC: ARM prologue linkage fix
  2008-07-08 19:25 [Qemu-devel] RFC: ARM prologue linkage fix Blue Swirl
@ 2008-07-08 20:43 ` Paul Brook
  2008-07-10 15:36   ` Blue Swirl
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Brook @ 2008-07-08 20:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

On Tuesday 08 July 2008, Blue Swirl wrote:
> Hi,
>
> I made a patch which allows sparc-linux-user target to be linked on an
> ARM host. Is this OK? Sparc32 helloworld program runs successfully,
> otherwise untested.

In principle it looks ok, however:

I think it deserves a comment in exec.c saying why we do this - the prologue 
is reached via a direct jump, so must be placed close to the code segment.

Also, calling something .bss.code_gen, than placing it is .data is just asking 
for trouble :-) I suggest calling the section ".gen_code".

We probably want the same thing on sparc and ppc hosts. I guess they can be 
added as required though.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] RFC: ARM prologue linkage fix
  2008-07-08 20:43 ` Paul Brook
@ 2008-07-10 15:36   ` Blue Swirl
  2008-07-10 16:33     ` Paul Brook
  0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2008-07-10 15:36 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]

On 7/8/08, Paul Brook <paul@codesourcery.com> wrote:
> On Tuesday 08 July 2008, Blue Swirl wrote:
>  > Hi,
>  >
>  > I made a patch which allows sparc-linux-user target to be linked on an
>  > ARM host. Is this OK? Sparc32 helloworld program runs successfully,
>  > otherwise untested.
>
>
> In principle it looks ok, however:
>
>  I think it deserves a comment in exec.c saying why we do this - the prologue
>  is reached via a direct jump, so must be placed close to the code segment.
>
>  Also, calling something .bss.code_gen, than placing it is .data is just asking
>  for trouble :-) I suggest calling the section ".gen_code".

Is this version OK then? Should I commit it?

[-- Attachment #2: fix_arm_prologue.diff --]
[-- Type: plain/text, Size: 1358 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] RFC: ARM prologue linkage fix
  2008-07-10 15:36   ` Blue Swirl
@ 2008-07-10 16:33     ` Paul Brook
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Brook @ 2008-07-10 16:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl

> >  > I made a patch which allows sparc-linux-user target to be linked on an
> >  > ARM host. Is this OK? Sparc32 helloworld program runs successfully,
> >  > otherwise untested.
>
> Is this version OK then? Should I commit it?

Your comment is somewhat ambiguous (all targets use a direct jump, ARM just 
has tighter restrictions on when that is possible). I suggest:

/* The prologue must be reachable with a direct jump. ARM has a limited
  branch range (possibly also PPC and SPARC?) so place it in a section
  close to code segment. */

Ok with that change.

Paul

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-10 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 19:25 [Qemu-devel] RFC: ARM prologue linkage fix Blue Swirl
2008-07-08 20:43 ` Paul Brook
2008-07-10 15:36   ` Blue Swirl
2008-07-10 16:33     ` Paul Brook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).