Linux user-space ELF loader

时光怂恿深爱的人放手 提交于 2019-12-02 20:58:14

A quick apt-cache search suggests libelf1, libelfg0 and/or libelfsh0. I think the elfsh program (in the namesake package) might be an interesting practical example of how to use libelfsh0.

I haven't tried any myself, but I hope they might be helpful. Good luck :-)

Google's Android, in it's "bionic" libc implementation, has a completely reimplemented ELF loader. It's reasonably clean, and probably a better source than gilbc if you're looking for something simple.

Take a look at libelf for reading the executable format. You are going to have trouble with this I think.

Sounds like, as you don't need libraries for anything, why not just mmap your executable, set data about various memory areas and jmp/b in?

I don't know if ARM has an NX-bit equivalent, but worth checking.

This tool contains an ELF loader: http://bitwagon.com/rtldi/rtldi.html

I reused the code from rtldi for an ELF chainloader in another project. The code is here: http://svn.gna.org/viewcvs/plash/trunk/chroot-jail/elf-chainloader/?rev=877 and there is some background here: http://plash.beasts.org/wiki/Story16. (Apparently I have to break these links because stackoverflow won't let me post >1 link!)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!