This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to get start/end information about functions?
- From: Ian Lance Taylor <iant at google dot com>
- To: "PRC" <panruochen at gmail dot com>
- Cc: "binutils" <binutils at sourceware dot org>
- Date: Mon, 14 Apr 2008 09:45:50 -0700
- Subject: Re: How to get start/end information about functions?
- References: <200804141647470874859@gmail.com>
"PRC" <panruochen@gmail.com> writes:
> I want to get start/end information about all functions from the output of `objdump'ing
> an ELF image. It seems that the start of the next function is also the end
> of the previous function if they are sorted ascendingly by thier start addresses.
> But how about the last function of the image, since it does not have a next function
> after it? Is there an easy way to do this?
When using ELF, the size of the function is stored in the st_size
field of the function symbol. This is printed by readelf -s or
objdump -t.
Ian