Re: ELF loading



cmk128@xxxxxxxxxxx wrote:
Hi
I am currently not quite understanding how to do the relocation of
the ELF format, so do you have any good tutorial?

Hi Peter,

Not strictly about "relocations", but there's info about the ELF format, including the ELF spec in text format, here:

http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html

More advanced analysis here:

http://www.mpeforth.com/arena/cwgtLinux.txt

The latter is, strictly speaking, "about" writing a Forth compiler, but it's done by a "hand-made" ELF - including dynamic linking!

Source for the Linux loader is in /usr/src/linux/fs/binfmt_elf.c.

Maybe something somewhere in there will be of help.

Best,
Frank
.


Quantcast