From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: John Vele <jveleg@gmail.com>
Subject: Re: [Qemu-devel] Execute a char buffer without loading ELF
Date: Wed, 24 Mar 2010 00:20:57 +0000 [thread overview]
Message-ID: <201003240020.58807.paul@codesourcery.com> (raw)
In-Reply-To: <37a0fa861003230950q4f875079xc681b77349359cbc@mail.gmail.com>
> 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
prev parent reply other threads:[~2010-03-24 0:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-23 16:50 [Qemu-devel] Execute a char buffer without loading ELF John Vele
2010-03-24 0:20 ` Paul Brook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201003240020.58807.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=jveleg@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.