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] | |
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;Why are you assuming that the header will always be at address 0x80480000 ? Perhaps for the applications you mention it is at some other address ?
But sir this address varies from application to application, how can we find a general way to get the program load address, is it present somewhere in the elf header ?
Cheers Nick
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |