qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu-user: relocating target code weakness


From: Stefano Bonifazi
Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness
Date: Tue, 25 Jan 2011 20:03:24 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

On 01/25/2011 05:22 PM, Richard Henderson wrote:
On 01/25/2011 02:47 AM, Stefano Bonifazi wrote:
You keep getting the name of the dynamic linker from the PT_INTERP program 
segment, but that gives you the absolute position of the dynamic linker inside 
the machine the target binary was created in.
Here qemu-user is an emultaor used for running that binary into another 
machine..
Qemu default to usr/gnemul/ the path where the libs for the target machines are 
stored...
So we need to patch the absolute dynamic linker name with the proper path..
In load_elf_interp,

     fd = open(path(filename), O_RDONLY);

Notice the path function call.  That does the translation into gnemul, given
the proper configure option, or -L command-line option.


r~
Hi!
Strange, I have all the target libs in the default host usr/gnemul folder, but your fixed qemu still complained for not finding ld.so.1 until I fixed the code..
I'll try to check why "path" doesn't work!
Thank you!
Best regards!
Stefano B.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]