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: Richard Henderson
Subject: Re: [Qemu-devel] qemu-user: relocating target code weakness
Date: Tue, 25 Jan 2011 08:22:25 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7

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~



reply via email to

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