qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Execute a char buffer without loading ELF


From: Paul Brook
Subject: Re: [Qemu-devel] Execute a char buffer without loading ELF
Date: Wed, 24 Mar 2010 00:20:57 +0000
User-agent: KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; )

> I am involved in a project that we use Qemu user mode for i386
> (./i386-linux-user/qemu-i386). I want to modify the source code
> in such a way to make qemu execute a buffer of bytes (given from the comman
> line for example) rather than loading
> an ELF file and executing. I started looking at linux-user/linuxload.c
> loader_exec() function  and linux-user/elfload.c load_elf_binary()
> function. Is there a way to bypass the loading of an ELF file and load a
> single buffer of bytes (that is i386 code) into memory
> and make Qemu start execution on it?

Short answer is no.

Long answer is:
- Creating an ELF image from a blob of data if fairly trivial, so you don't 
really need this functionality.
- You're using linux usermode emulation. Linux doesn't load and execute random 
data. Neither do we.
- Loading a blob of code at an arbitrary location probably won't do what you 
want anyway.

Paul




reply via email to

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