About ELF format

vinaynkaranth@yahoo.com (Vinay)
30 May 2004 13:26:56 -0400

          From comp.compilers

Related articles
About ELF format vinaynkaranth@yahoo.com (2004-05-30)
Re: About ELF format kharmon@optonline.net (George Huber) (2004-06-06)
Re: About ELF format zhangjie@magima.com.cn (Jie Zhang) (2004-06-06)
Re: About ELF format tbauer@cadrc.calpoly.edu (Tim Bauer) (2004-06-06)
Re: About ELF format vinaynkaranth@yahoo.com (2004-06-11)
Re: About ELF format lod@egobolinu.xorg (Lode) (2004-09-21)
| List of all articles for this month |
From: vinaynkaranth@yahoo.com (Vinay)
Newsgroups: comp.compilers
Date: 30 May 2004 13:26:56 -0400
Organization: http://groups.google.com
Keywords: debug, linker, question
Posted-Date: 30 May 2004 13:26:56 EDT

Hi all


I have a little doubt regarding the ELF file. Here is a Hex snap shot
of an ELF file compiled using GCC on RH linux 9.0 (X86).


00000000h: 7F 45 4C 46 01 01 01 00 00 00 00 00 00 00 00 00
00000010h: 02 00 03 00 01 00 00 00 C0 83 04 08 34 00 00 00
00000020h: 08 4F 00 00 00 00 00 00 34 00 20 00 06 00 28 00
00000030h: 1E 00 1B 00 06 00 00 00 34 00 00 00 34 80 04 08
00000040h: 34 80 04 08 C0 00 00 00 C0 00 00 00 05 00 00 00


>From the ELF document I understand that at the offset 0x20 0x21
contains the section header table's file offset in bytes.
In the above snap shot it shows, "0x4F08". But the offset "0x4F08", it
looks as though it is not the section table
start address. Here is the snap shot of offset "0x4F08".


00004ee0h: 2E 64 79 6E 61 6D 69 63 00 2E 73 62 73 73 00 2E
00004ef0h: 62 73 73 00 2E 73 74 61 62 00 2E 73 74 61 62 73
00004f00h: 74 72 00 2E 63 6F 6D 6D 65 6E 74 00 2E 6E 6F 74
00004f10h: 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00004f20h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00004f30h: 00 00 00 00 00 00 00 00 00 00 00 00 1B 00 00 00
00004f40h: 01 00 00 00 02 00 00 00 F4 80 04 08 F4 00 00 00
00004f50h: 13 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00
00004f60h: 00 00 00 00 23 00 00 00 07 00 00 00 02 00 00 00


Can any one please let me know if I have interpreted the ELF header
properly or not. Also if this is not the correct
group for this, please let me know the correct group where I can post
this question.


Thanx a lot.
Vinay


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.