I am writing a c program that gets an elf file, loads it and then executes it. I have read all of the headers (elf, section, program, relocation). The next part should be getting what is going to be loaded, right?
How do I proceed? As I understand I should either get LOAD, ALLOC and EXECINST type sections or LOAD type program segments? Or what?
When I get the needed data I should map it into the memory with mmap().
I've read ELF documentation many times now, but I still don't know how to proceed. Any and all help is greatly appreciated.
exec ()for POSIX). - Raedwald