qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] how to run a application compiled for sparc platform using qemu-sparc?
@ 2012-02-09  6:25 Dylan
  2012-02-09 12:18 ` Paul Brook
  0 siblings, 1 reply; 2+ messages in thread
From: Dylan @ 2012-02-09  6:25 UTC (permalink / raw)
  To: qemu-devel

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

I want to run a application using qemu-sparc,for example "$qemu-sparc hello",where hello is an application compiled for sparc platform. And the host os and architecture are linux and x86. But it catches an error when loading elf file "hello",the spesific error is as follow:
 // in load_elf_image function
  target_mmap(abi_ulong start, abi_ulong len, int prot, int flags, int fd,abi_ulong offset)
  {
       ... ... 
       /*offset=ox2bf0*/
       if(offset & ~TARGET_PAGE_MASK) /*the condition is true */
           errno=EINVAL;
   }
  
 the results of readelf -l hello are as follow:
 program headers:
     TYPE       offset    virtAddr               phyAddr           FileSiz         MemSiz
     LOAD      0x054    0x4000 0000       0x4000 0000    0x02bf0      0x02bf0
  
 In additon, what is mean of the opiton "-B offset" for qemu-sparc , should I set a value for it ,for example :
     $qemu-sparc hello -B 0x8048000

[-- Attachment #2: Type: text/html, Size: 1641 bytes --]

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

* Re: [Qemu-devel] how to run a application compiled for sparc platform using qemu-sparc?
  2012-02-09  6:25 [Qemu-devel] how to run a application compiled for sparc platform using qemu-sparc? Dylan
@ 2012-02-09 12:18 ` Paul Brook
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Brook @ 2012-02-09 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dylan

>  the results of readelf -l hello are as follow:
>  program headers:
>      TYPE       offset    virtAddr               phyAddr           FileSiz 
>        MemSiz LOAD      0x054    0x4000 0000       0x4000 0000    0x02bf0 
>     0x02bf0

Clearly not a linux binary.  Those have file offsets and virtual addresses 
aligned modulo page size so that they can be mmapped directly into the process 
address space.  I'm pretty sure this would fail in the same way on a real 
sparc-linux system.

Paul

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

end of thread, other threads:[~2012-02-09 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09  6:25 [Qemu-devel] how to run a application compiled for sparc platform using qemu-sparc? Dylan
2012-02-09 12:18 ` 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).