This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use COMDAT section group instead of gnu.linkonce?


On Mon, May 03, 2004 at 01:47:52PM -0700, Jim Wilson wrote:
> 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.

This patch

http://gcc.gnu.org/ml/gcc-patches/1999-02n/msg00802.html

removed the usage of section symbols unconditionally. Only Irix 6
defines DWARF2_GENERATE_TEXT_SECTION_LABEL as 0.

With my current binutils COMDAT group patches, I patched gcc 3.4 to
use COMDAT group instead of gnu.linkonce sections. There are no
regressions on ia32, ia64 and x86_64:

http://gcc.gnu.org/ml/gcc-testresults/2004-05/msg00175.html
http://gcc.gnu.org/ml/gcc-testresults/2004-05/msg00174.html
http://gcc.gnu.org/ml/gcc-testresults/2004-05/msg00173.html

Should we start moving toward COMDAT section group? It will help fix
DWARF2 problems.


H.J.


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