This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: patch was: dwarf2 debug dependent upon GAS?
- To: jason@cygnus.com
- Subject: Re: patch was: dwarf2 debug dependent upon GAS?
- From: Ian Lance Taylor <ian@zembu.com>
- Date: 13 Jun 1999 01:17:39 -0400
- CC: binutils@sourceware.cygnus.com
- References: <19990226012522.D17655@rjlhome.sco.com> <29507.920192219@hurl.cygnus.com> <19990228160642.H20315@rjlhome.sco.com> <u9u2w67y67.fsf@yorick.cygnus.com> <19990301102454.Q20315@rjlhome.sco.com> <u9hfs585cd.fsf@yorick.cygnus.com> <19990302002736.G27552@rjlhome.sco.com> <u9u2vszc6c.fsf@yorick.cygnus.com>
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