This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Understanding symbols in .o or .dylib file
- From: Ian Lance Taylor <iant at google dot com>
- To: Peng Yu <pengyu dot ut at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Sat, 18 May 2013 21:54:29 -0700
- Subject: Re: Understanding symbols in .o or .dylib file
- References: <CABrM6wk3Y1soZiSeVm8FCiZaQXHFuCAs0ZbuOj8Sk9unZu0rhQ at mail dot gmail dot com>
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