pea
developer
Hi all,
I am trying to compile a very simple ELF (thats the fxe file format, minus some gp32 specific stuff) and I would like to load it into memory from within a running app, find the address of a function within the code, and then call that function.
The ELF code will have no dependencies (or whatever they are called) and the function will always have the same name and always be the "entry point".
The ELF code will have no globals, and any shared functions it requires (such as malloc/free) will be passed into the function as a struct of function pointers.
Does anyone have a simple example of loading an ELF into memory and/or perhaps locating the entry point or any functions within the ELF?
On the flipside, does anyone know the best way (makefile) to compile my ELF to achieve this?
I am trying to compile a very simple ELF (thats the fxe file format, minus some gp32 specific stuff) and I would like to load it into memory from within a running app, find the address of a function within the code, and then call that function.
The ELF code will have no dependencies (or whatever they are called) and the function will always have the same name and always be the "entry point".
The ELF code will have no globals, and any shared functions it requires (such as malloc/free) will be passed into the function as a struct of function pointers.
Does anyone have a simple example of loading an ELF into memory and/or perhaps locating the entry point or any functions within the ELF?
On the flipside, does anyone know the best way (makefile) to compile my ELF to achieve this?