Does gcc ever use section symbol? (Re: PATCH: Multiple sections with same name don't work)

Jim Wilson wilson@specifixinc.com
Mon May 3 20:47:00 GMT 2004


H. J. Lu wrote:
> On Sun, May 02, 2004 at 11:11:10PM +0930, Alan Modra wrote:
>>On Sat, May 01, 2004 at 11:42:26AM -0700, Zack Weinberg wrote:
>>Ok, a question for you about gcc behaviour, past and present.  Does gcc
>>emit code that references section symbols?  If not, I'll glady remove
>>support for them in gas, which would simplify the problem of duplicate
>>section names.

See text_section_label in dwarf2out.c.  It defaults to being a section 
symbol.  We use a label only if DWARF2_GENERATE_TEXT_SECTION_LAEBL is 
defined.

In older gcc versions, e.g. 2.8.1, we used a lot of section symbols. 
Over time, most of them have been replaced with labels as some 
assemblers don't handle section symbols, and we wanted the dwarf2 
support to work for all targets.  You can check for this by grepping for 
uses of stripattributes.  There is only one use left in current sources.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list