[ TechnoCage | Caskey | elfprint ]
elfprint is a program that displays the contents of the ELF object file format for perusal by someone who does not want to have to read the output of od. It is currently written and runs under linux. It relies upon the linux/elf.h header. A later version will incorporate these structures into the source tree itself so as to avoid being dependent upon the linux source.
$ ./elfprint elfprint
elfprint: ELF 32 bit, LSB encoded, version 1 (current)
type: 0x0002
machine: 0x0003
version: 0x00000001 version 1 (current)
entry point: 0x080485c0
phoff: 0x00000034
shoff: 0x000018e4
flags: 0000000000
ehsize: 0x0034
phentsize: 0x0020
phnum: 0x0006
shentsize: 0x0028
shstrndx: 0x0019
Segment File Virtual Physical File Memory Align-
No. Type Offset Address Address Size Size Flags ment
00: 00000006 00000034 08048034 08048034 000000c0 000000c0 00000005 00000004
01: 00000003 000000f4 080480f4 080480f4 00000013 00000013 00000004 00000001
02: 00000001 00000000 08048000 08048000 0000150a 0000150a 00000005 00001000
03: 00000001 0000150c 0804a50c 0804a50c 00000108 00000180 00000006 00001000
04: 00000002 00001574 0804a574 0804a574 000000a0 000000a0 00000006 00000004
05: 00000004 00000108 08048108 08048108 00000020 00000020 00000004 00000004
Well, the ELF format specifies two binary versions. The portable one and the Windows one. I only know for sure that linux uses it having switched from a.out years ago.
Intel has a site where they host lots of valuable information regarding ELF. They mention that they only maintain the site for 'historic' purposes but hopefully it won't go away. The linux ELF HOWTO says that UNIX System Laboratories created ELF but as far as I know it was the Intel TIS that did it. I'm not in any way knowledgeable about ELF history so you'll just have to look at both.
http://www.technocage.com/~caskey/elfprint You're soaking in it!
