This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with elf header


On 2/14/06, Dave Korn <dave.korn@artimi.com> wrote:
> On 14 February 2006 05:35, 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.
>
>   Can't reproduce it here:
>
> [dk@pepper dk]$ uname -a
> Linux pepper.local 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
> GNU/Linux
> [dk@pepper dk]$ readelf -lhS /bin/gzip /usr/bin/bunzip2 | grep -i entry
>   Entry point address:               0x8048db0
>   Entry point address:               0x8049270
> [dk@pepper dk]$
>
>
>   Perhaps a few more details ?
>
>
>     cheers,
>       DaveK
> --
> Can't think of a witty .sigline today....
>
>

I am trying to access the header with this piece of code,
Its working fine for most of the executables but for the few above
mentioned application, its returning zero.

  Elf32_Ehdr* self = (Elf32_Ehdr *)0x8048000;
    ptr=(int *)self->e_entry;



--
Regards,
Sandeep





A man with one watch knows what time it is; a man with two watches is
never quite sure.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]