[Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Prashant Vaibhav
Hello, I am working on target-ia64, but am stuck during ia64 ELF loading. Referring to function probe_guest_base() in linux-user/elfload.c around line 1350, called from around line 1484 -- When the main binary is being mmap'd, the host address and guest address should ideally be the same. If

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Marc Lörner
Hello Prashant, first of all your 0x464 is wrong it's 0x460. In Volume 2 of the IASDM page 2:46 you see that these three upper bits correspond to the 8 virtual regions (here: region 2). So maybe you can just disregard these bits and use the rest as new offset to an faked guest_base that fits your

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Alexander Graf
Hi Prashant, Am 12.07.2011 um 17:29 schrieb Prashant Vaibhav q...@mercurysquad.com: Hello, I am working on target-ia64, but am stuck during ia64 ELF loading. Referring to function probe_guest_base() in linux-user/elfload.c around line 1350, called from around line 1484 -- When the

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Richard Henderson
On 07/12/2011 09:43 AM, Alexander Graf wrote: For now, just force the mapping to somewhere mappable :) Unfortunately, I can tell you that there is no such place. The text segment is mapped by default at 0x4000 and the data segment is by default mapped at 0x6000. If you

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Peter Maydell
On 12 July 2011 17:43, Alexander Graf ag...@suse.de wrote: I guess the long-term solution here really is to use the softmmu for linux-user as well - unless we're running 32-on-64. Even for 32-on-64 we need to control the guest's address space properly (so we don't do things like gratuitously

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Prashant Vaibhav
Yes, exactly what happened when loading a non-trivial binary. :-( Oh well. On Wed, Jul 13, 2011 at 12:04 AM, Richard Henderson r...@twiddle.net wrote: On 07/12/2011 09:43 AM, Alexander Graf wrote: For now, just force the mapping to somewhere mappable :) Unfortunately, I can tell you that

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Richard Henderson
On 07/12/2011 01:58 PM, Prashant Vaibhav wrote: Yes, exactly what happened when loading a non-trivial binary. :-( Oh well. If you've got an ia64 cross-compiler, you could still make progress on qemu by building your own binaries and linking them somewhere convenient in the low 64 TB. r~

Re: [Qemu-devel] Loading ELF binaries with very high base addresses

2011-07-12 Thread Prashant Vaibhav
That is what I am doing except that my binaries also don't have any data section and don't link against any libraries. The text section does start at 0x4000 but they get mapped at 0x1000 or similar location. I can also build binaries with low base addresses. When these basic ones are