This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Use COMDAT section group instead of gnu.linkonce?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jim Wilson <wilson at specifixinc dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 3 May 2004 22:46:19 -0700
- Subject: Use COMDAT section group instead of gnu.linkonce?
- References: <20040501034300.GA22385@lucon.org> <20040501042506.GS2565@bubble.modra.org> <87d65obuji.fsf@egil.codesourcery.com> <20040501055008.GA24493@lucon.org> <20040501070618.GA25679@lucon.org> <20040501144439.GU2565@bubble.modra.org> <87wu3wrnu5.fsf@egil.codesourcery.com> <20040502134110.GY2565@bubble.modra.org> <20040502145558.GB1380@lucon.org> <4096AFF8.10305@specifixinc.com>
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.