Elf loading

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
DarylD

Elf loading

Post by DarylD »

Does anybody know of any good tutorials on writing an elf loader?

I have got some way through my loader, but I am finding it difficult to get it totally clear in my head what I want to achieve.

I have already got the elf format pdf file which is a great help but I am after more of an implementation example rather than specification.

Many thanks

Daryl.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Elf loading

Post by Pype.Clicker »

i have some elf-loading and decoding code in modmaker/elfopen.c, but it's a bit "specific" to module conversion for Clicker.
I also made up a small handle to the most important parts of ELF definition here
whyme_t

Re:Elf loading

Post by whyme_t »

here is a link a found when looking for info on elf files, http://www.muppetlabs.com/~breadbox/software/ELF.txt
eL JeDi

Re:Elf loading

Post by eL JeDi »

hi,

I've looked linux kernels (1.2.13,2.0.30,2.2.19), and in all kernels this file: fs/binfmt_elf.c. ( and elf especification 1.2 ;))

I've started with the static ELF, becouse its more easy to implement. When u go to implement dinamics, take a look at the funtion create_elf_tables() and AT_ITEMS or DLINFO_ITEMS

Here u have some addresses that helped me:

http://www.geocities.com/SiliconValley/ ... -init.html

http://www.iar.unlp.edu.ar/~fede/revist ... /1059.html
http://www.iar.unlp.edu.ar/~fede/revist ... /1060.html

hope it helps
Post Reply