String table in ELF

蓝咒 提交于 2019-12-03 06:16:09
Samir Baid

For the first question, we would need the hexedit of the elf file to understand properly.

For the second question - strtab stands for String Table shstrtab stands for Section Header String table.

When we read ELF header, we see that every ElfHeader structure contains a member called e_shstrndx. This is an index to the shstrtab. If you use this index and then read from shstrtab you can find the name of that section.

strtab, is the string table for all other references. When you read symbols from an ELF object, every SYmbol structure (Elf32_Sym) has a member called st_name. This is an index into strtab to get the string name of that symbol.

Can you please elaborate more on array of symbol strings? Also, what do you mean by names table?

You can refer to the following link - Reading ELF String Table on Linux from C

Hope this answers your question.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!