Page 1 of 1

Elf loading

Posted: Mon Jan 27, 2003 4:14 am
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.

Re:Elf loading

Posted: Mon Jan 27, 2003 4:49 am
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

Re:Elf loading

Posted: Mon Jan 27, 2003 5:33 am
by whyme_t
here is a link a found when looking for info on elf files, http://www.muppetlabs.com/~breadbox/software/ELF.txt

Re:Elf loading

Posted: Mon Jan 27, 2003 11:50 am
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