This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
using libbfd for reading procedure information and hidden data in the text segment
- From: Kugan Vivekanandarajah <kuganv at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 5 Jul 2005 14:04:15 +0800
- Subject: using libbfd for reading procedure information and hidden data in the text segment
- Reply-to: Kugan Vivekanandarajah <kuganv at gmail dot com>
For my research, I need to construct control flow graph (CFG) from the
executable; separately for each procedure in the executable
(executable is compiled with gcc and I can compile the code with all
the necessary compilation switches).
I am using libbfd for reading the code sections and the symbols. Is
there any way I can do the following with the information provided by
the libbfd.
1. By reading the symbol information can I tell whether it is a
function or not. That is, can I find out the procedures and its
starting and end addresses.
2. Also, the compilers seem to be inserting data inside the text
section. For example, for switch statements are some time handled with
the jump table. Is there anyway I can find out the start address and
the end address of these data inside the code section.
I will appreciate any pointers or links regarding this.
Thanks,
--
Kugan Vivekanandarajah
Graduate Student
www.ntu.edu.sg/home5/pm2096207