Problem with elf header

Eric Christopher echristo@apple.com
Tue Feb 14 19:28:00 GMT 2006


On Feb 13, 2006, at 9:35 PM, Sandeep Kumar wrote:

> Can anyone just tell me that why after reading the elf headers of the
> applications like gzip, bunzip2 on the x86 machines , the program
> entry point along with all other entries are zeros.

Something wrong with your reader?

-eric

[echristo@dragon echristo]$ readelf -l /usr/bin/gzip

Elf file type is EXEC (Executable file)
Entry point 0x8048e10
There are 8 program headers, starting at offset 52

Program Headers:
   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg  
Align
   PHDR           0x000034 0x08047034 0x08047034 0x00100 0x00100 R E 0x4
   INTERP         0x000134 0x08047134 0x08047134 0x00013 0x00013 R   0x1
       [Requesting program interpreter: /lib/ld-linux.so.2]
   LOAD           0x000000 0x08047000 0x08047000 0x0c7d4 0x0c7d4 R E  
0x1000
   LOAD           0x00c7d4 0x080547d4 0x080547d4 0x00ca0 0x522dc RW   
0x1000
   DYNAMIC        0x00c7e8 0x080547e8 0x080547e8 0x000c8 0x000c8 RW  0x4
   NOTE           0x000148 0x08047148 0x08047148 0x00020 0x00020 R   0x4
   GNU_EH_FRAME   0x00c75c 0x0805375c 0x0805375c 0x0001c 0x0001c R   0x4
   STACK          0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

Section to Segment mapping:
   Segment Sections...
    00
    01     .interp
    02     .interp .note.ABI- 
tag .dynstr .gnu.liblist .gnu.conflict .hash .dynsym .gnu.version .gnu.v 
ersion_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr  
.eh_frame
    03     .ctors .dtors .jcr .dynamic .got .got.plt .data .dynbss .bss
    04     .dynamic
    05     .note.ABI-tag
    06     .eh_frame_hdr
    07



More information about the Binutils mailing list