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: patch was: dwarf2 debug dependent upon GAS?


   From: Jason Merrill <jason@cygnus.com>
   Date: 11 Mar 1999 00:02:35 -0800

   >>>>> Robert Lipe <robertlipe@usa.net> writes:

   [ context: SCO as doesn't support referring to the section name as a
   symbol, so we're changing the dwarf2 code in gcc to spit out a label to use
   instead. ]

    >>  >> shortening the label names, so as to use less space in the symbol
    >>  >> table.
    >> 
    >>  > They're locals, so they don't go in the symbol table, right?
    >>  > They certainly don't appear in nm or even a 'strings -a' of the
    >>  > resulting dot-o.
    >> 
    >> Don't they?  I thought they would, since we are creating relocs
    >> against them.

    > Uuuh, no.  That's how we started this discussion.  The section name
    > was treated as a local label for the beginning of the section in this
    > compilation unit.   Therefore, they're completely local and don't need
    > to appear in the symbol table.

   This is irrelevant to your patch, but on Linux the local symbols do show up
   in the symbol table, as I remembered; I always filter nm output as a
   result.  This may be a gas thing.  Any gas folk care to comment?

It isn't that any local symbol appears in the symbol table; it's that
local symbols in linkonce sections appear in the symbol table.  You
see it more than most of us because you use C++.

Anyhow, I think that's a bug.  I changed it so that now local symbols
should no longer appear in the symbol table even if they are in
linkonce sections.  This change may have some unexpected effects,
particularly when it comes to debugging.  I would encourage people to
report any differences they notice when working with C++ programs
which use templates.

Ian

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