bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gprof cannot find symbols in a MIPS IRIX a.out


From: Anmol Paralkar
Subject: Re: gprof cannot find symbols in a MIPS IRIX a.out
Date: Mon, 22 Dec 2003 06:58:18 +0530 (IST)

Hi Ian,

 I made one more change to gprof: I made gprof/corefile.c:core_sym_class()
 return symbol type 'T' for 'A' type symbols. With this change in place
 gprof/corefile.c:core_create_function_syms() succeeds. I tested it out
 (with -z) and I seem to get a Flat Profile (with a trivial hello-world 
program):

________________________________________________________________________________
Flat profile:

Each sample counts as 0.01 seconds.
 no time accumulated

  %   cumulative   self              self     total
 time   seconds   seconds    calls  Ts/call  Ts/call  name
  0.00      0.00     0.00                             __istart
  0.00      0.00     0.00                             _mcleanup
  0.00      0.00     0.00                             foo
  0.00      0.00     0.00                             main
  0.00      0.00     0.00                             minbrk
  0.00      0.00     0.00                             monstartup
________________________________________________________________________________

 Here's a snip of my Call Graph:

-----------------------------------------------
                                                 <spontaneous>
[3]      0.0    0.00    0.00                 main [3]
                0.00    0.00       1/1           __start (7)
-----------------------------------------------

 If you could tell me if the change I made was the right thing to do, it would 
be reassuring.

Thanks & Regards,
Anmol.

On Mon, 21 Dec 2003, Ian Lance Taylor wrote:

> Anmol Paralkar <address@hidden> writes:
>
> >  Actually, I'm not trying to profile a shared library. The problem is that
> >  by default compilation assumes shared libraries, and so the symbols are
> >  placed in the dynamic symbol table, whereas gprof expects them in the
> >  normal one.
>
> That is not how most ELF linkers behave, although Daniel suggested
> that the Irix linker does behave that way.  Most ELF linkers create
> both a normal symbol and a dynamic symbol table when linking against a
> shared object.  I expect that there is some way to tell the Irix
> linker to do the same.  In general, the dynamic symbol table need only
> contain symbols which are dynamically linked; the normal symbol table
> is normally larger.
>
> >  So the change that I made:
> > > Precisely how does it not work?  I don't know if that will give you
> > > correct profiling, but I would not expect you to get the ``no symbol''
> > > error.
> >
> >  Here's the debugger trace:
>
> I'm sorry, I don't know why it isn't working.
>
> Ian
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]