문제

I know we can get the user defined function's begin address in elf by reading symbol table, just like below, function main and foo:

08048330 T _start
0804a014 b completed.6159
0804a00c W data_start
0804a018 b dtor_idx.6161
080483e4 T foo
080483c0 t frame_dummy
080483ee T main

but how to get the end address of certain functions?

Could anyone give me some help? Thank you!

도움이 되었습니까?

해결책

nm -S a.out will show the symbol size (if available). Then you can get the 'end address' from the start address and size.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top