access Elf section header table

Posted by idealistikz on Stack Overflow See other posts from Stack Overflow or by idealistikz
Published on 2010-05-27T05:07:12Z Indexed on 2010/05/27 5:11 UTC
Read the original article Hit count: 188

Filed under:

Assume I have the following:

Elf_FIle_Header *fileHeader //struct pointer, points to start of the Elf file header
fileHeader->offset //byte offset from start of file to section headers

Elf_Section_Header *sectionHeader = (Elf_Section_Header *)(char *)fileHeader + fileHeader->offset

Why doesn't the above line point me to the start of the section header table? How do I point to the start of the section header table?

© Stack Overflow or respective owner

Related posts about c