> ELF Stub с DLOPEN пока не нашел :(
>
Ну, я же помню, что куда-то его архивировал :)
Нашел:
http://downloads.sourceforge.net/spf/lnxstub.zip?use_mirror=kentВсе карты в руки:
;Linux ELF stub loader (C) 2005 by Dmitry Groshev
;Distributed under GNU LGPL
;To use, add your executable code to the end of assembled stub; when
resulting
;file is run, stub will load your code and pass control to its 0th byte.
;Code 'll be loaded into a contiguous memory block of "lamemem" bytes in
size
;at fixed base address 0804A000h with readable/writable/executable
permissions.
;On top of stack, your code will receive address of GOT, and under it,
every-
;thing else Linux passes to an ELF executable.
;GOT contains:
;+00 DD address of DYNAMIC
;+04 DD reserved
;+08 DD reserved
;+12 DD address of dlopen()
;+16 DD address of dlsym()
;+20 DD address of dlvsym()
;What your code will do with all of this, is entirely up to you.