This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gprof rejects egcs' global constructor calling functions


On 25 May 2000, Ian Lance Taylor wrote:
>    Date: Thu, 25 May 2000 13:53:58 +0200
>    From: Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>

[...]
>    This is clearly a bug, but I'm not fluent enough in the details of
>    the ELF specs to know if it's a bug in the compiler to have
>    chosen that name with '.'s in it, or if gprof is falsely rejecting
>    this symbol name.
> 
> gprof is falsely rejecting the symbol name.  The comment explains
> why.  It is specific to a.out.

Hmmm... does that mean gcc would have chosen a different name
than _GLOBAL_.I.main on an a.out platform, to avoid producing
an illegal symbol, there? Or is a dot somewhere else in the
name legal on a.out, and gprof is just shooting blindly?

> That a.out specific test should be replaced with a call to
> bfd_is_local_label.

Hmm... that test doesn't do as much as the one in gprof/core.c, for a.out.
bfd_generic_is_local_label_name() only checks the first character. Doesn't
look to me as if they're really checking for the same thing.

BTW: there's another fishy test in gprof/core.c: it rejects the name
'__gnu_compiled'. The same test is also done in nm and objdump, for
similar reasons. Those also reject "__gcc2_compiled", but gprof/core.c
doesn't do that. It probably should. To me this looks like something to be
moved into the bfd_is_local_label() implementation, or a similarly central
place.

Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]