On Wed, 10 Jan 2007 10:31:50 -0600, Chris Mellon <[EMAIL PROTECTED]> wrote: > On 10 Jan 2007 08:12:41 -0800, sturlamolden <[EMAIL PROTECTED]> wrote: >> >> Chris Mellon wrote: >> >> > This works fine if the binary data is "pure" asm, but the impresssion >> > the OP gave is that it's a compiled binary, which you can't just "jump >> > into" this way. >> >> You may have to offset the function pointer so the entry point becomes >> correct. >> > > That won't be enough. You basically would have to re-implement the OS > loading process, handling relocations and loading any linked > libraries. Possible, in theory, but very non-trivial.
Yeah, that was implicitly my thinking a bit up in the thread. If all you have is an executable file (COFF/ELF/...) as a string, and you have no os.exec(string) or similar, then you're in trouble. At least if it has to work. /Jorgen -- // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu \X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn! -- http://mail.python.org/mailman/listinfo/python-list