Link to home
Start Free TrialLog in
Avatar of rongz
rongz

asked on

access ELF header

Hi,
can somebody show me an exmaple how to read elf head in a elf file? Thanks.
Avatar of sunnycoder
sunnycoder
Flag of India image

Hi rongz,

you mean read the contents of the executable in the executable?
If you are using C, fopen it (argv[0]) and use fread to read until EOF .... That should suffice

Cheers!
sunnycoder
Avatar of rongz
rongz

ASKER

no, I mean how to access ELF header (e.g. retrieve information encoded in ELF header) in an ELF format file.
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial