Understanding symbols in .o or .dylib file

Ian Lance Taylor iant@google.com
Sun May 19 04:54:00 GMT 2013


On Thu, May 16, 2013 at 9:49 AM, Peng Yu <pengyu.ut@gmail.com> wrote:
>
> I have the following .dylib. If I want to find the symbol
> corresponding to myprint. I see __GLOBAL__I__Z7myprintv and
> __Z7myprintv. What are the difference between them? Besides using
> grep, is there a better way to search for symbols corresponding to a
> function? Thanks.

You can use c++filt to see what these symbols mean.

> c++filt _GLOBAL__I__Z7myprintv
global constructors keyed to myprint()
> c++filt _Z7myprintv
myprint()

Ian



More information about the Binutils mailing list