This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to get start/end information about functions?


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]