Question

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!

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top