dumping C structure sizes from ELF object file

前端 未结 4 1928
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-01 09:16

How can you extract the sizes of all C structures from an ELF object file with debugging symbols?

Individual struct sizes can be obtained from GDB using \"print sizeof(s

4条回答
  •  囚心锁ツ
    2021-02-01 09:49

    pahole shows this and other details about structs. Its git repo is at http://www.kernel.org/git/?p=linux/kernel/git/acme/pahole.git;a=summary.

提交回复
热议问题