Sunday, November 12, 2006

elf:From The Programmer's Perspective

http://linux4u.jinr.ru/usoft/WWW/www_debian.org/Documentation/elf/elf.html

Chinese version:
http://zhanjun.net/?q=node/17

Understanding ELF using readelf and objdump
http://www.linuxforums.org/misc/understanding_elf_using_readelf_and_objdump.html

Biew: Alternative tool to inspect ELF structure

http://biew.sourceforge.net/

download the source code of the GUI tool.

releated tools: file, objdump, size, readelf

1. Elf file types: executable, relocatable(.o), shared object(.so)
$file file_name

2. sections of ELF
.init
be called before calling main().
.fini
be called after main() return.
<>
.ctors
constructor pointer array. __CTOR_LIST__
.dtors
desctructor pointer array. __DTOR_LISt__
$objdump -s -j .ctors ./crtbegin.o
.text
__do_global_dtors_aux() travel over __DTOR_LIST__
.