0

I have a Linux kernel that I open with Ghidra. There is a task_struct that I want to map all the fields. The problem is that os big struct (around 3000 bytes) and have lot of ifdef in the source code.

Is there any tool that make that analysis automatically?

1 Answer 1

0

If you can compile this kernel or one of its files using the structure in question yourself with exactly the same configuration you can use pahole. You also can extract the define constants of kernel configuration from /proc/config.gz if it is enabled, compile a tiny kernel module with this configuration and extract the structure layout from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.