readelf/objdump segment size doesn't match symbol table sizes

Khem Raj kraj@mvista.com
Fri Feb 9 20:45:00 GMT 2007


hssathya wrote:
> Hi,
>
> I have a doubt. I want to run a function through debugger. What exactly i
> want to do is i want to point PC (Program counter ) to start of the function
> and then put a break point at the end of the fucntion, so that when i say
> "go" PC should start incrementing form that function and should break when
> it reaches the break point. Form readelf i can get the starting address of
> the function, but how to get the end address of a function.
>
> Is the size in the readelf output is size of the function or what?
>
> Is there any other way to know the size of the function?
>
>
>   
when you dump symbol table readelf -s then the third column will show 
the size this added to your start address should give you end of 
function. You can also use objdump -d to disassemble your binary and 
then check for the function start and end addresses.




More information about the Binutils mailing list