This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: cannot build mainline GCC with mainline binutils
- From: Bob Wilson <bwilson at tensilica dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 02 Dec 2004 17:00:22 -0800
- Subject: Re: cannot build mainline GCC with mainline binutils
- Organization: Tensilica, Inc.
- References: <41ABCE61.7090200@tensilica.com> <20041130015025.GA32329@lucon.org>
H. J. Lu wrote:
On Mon, Nov 29, 2004 at 05:35:29PM -0800, Wilson; Bob, Tensillca wrote:
I discovered a problem while trying to build mainline GCC with mainline
binutils for an xtensa-elf target. It looks like some of the recent comdat
patches require the assembler's DIFF_EXPR_OK macro to be defined. This is
not true for Xtensa or MIPS.
[details removed]
Someone is wrong. Can you create very very small testcase in assembly?
This turned out to be a bug in the Xtensa port of GAS. I've committed the
following patch that fixes the problem.
2004-12-02 Bob Wilson <bob.wilson@acm.org>
* config/tc-xtensa.c (xtensa_switch_section_emit_state): Use subseg_set.
(xtensa_restore_emit_state): Likewise.
Index: tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.19
diff -u -p -r1.19 tc-xtensa.c
--- tc-xtensa.c 22 Nov 2004 19:13:04 -0000 1.19
+++ tc-xtensa.c 3 Dec 2004 00:54:51 -0000
@@ -10267,7 +10267,7 @@ xtensa_switch_section_emit_state (emit_s
state->now_subseg = now_subseg;
state->generating_literals = generating_literals;
generating_literals++;
- subseg_new (segment_name (new_now_seg), new_now_subseg);
+ subseg_set (new_now_seg, new_now_subseg);
}
@@ -10277,7 +10277,7 @@ static void
xtensa_restore_emit_state (emit_state *state)
{
generating_literals = state->generating_literals;
- subseg_new (state->name, state->now_subseg);
+ subseg_set (state->now_seg, state->now_subseg);
}