As there was a lot of confusion before, so I am rephrasing question here removing old one.
I want to print all the symbolic info from vmlinux
binary on power-pc
architecture - static
, dynamic(.so)
as well as run time including kallsyms (module symbols)
and any other if I dont know about.
I am not interested (actually I can not and its difficult to explain here why
) in using GDB
, readelf
, /proc/kallsyms
or system.map
or getting the core file
.
I am more intereted in knowing how GDB, readelf, objdump, kallsyms or systme.map
are generated . Which kernel data structures they use ? Which library they prefer to use - libelf
or libdwarf
As far my understanding says:
- use
libelf/libdwarf
for all static information. rld_map
section need to be parsed for the dynamic .so files.- For
kallsyms
, I am not sure how to handle symbolic info for the LKMs that would be added dynamically.
Considering above situation, please suggest me is it wise decision to write the tool from scratch. I was able to get a list of all function names and their address using libdwarf for now.
Can someone direct me towards some source code that is best possible to use in above situation or that can be modified somewhat for the above scenarion rather than going to write something from beginning or it is not practically possible. (May be some snippet of readelf/objdump/GDB)
Please ask for clarification and update if needed.
Thanks !!