For a school project, my group is trying to make a linux C program to document the relationships between files, global function, and global variables in a large program. In lieu of parsing through .c files to try and guess which functions and variable are accessed from different function, we were hoping there was some tool (maybe gcc intermediate output) that could do this for us and be easier to read.
I've tried looking at stabs and dwarf-2 assembly files, and output from nm, readelf, and objdump, but can't find anything that notes which functions and variable are accessed from a function. Is this possible at all?
Thanks for any help, and let me know if this needs clarification.