This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
fix Xtensa assembler bug with -gstabs
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Mon, 02 Apr 2007 13:08:09 -0700
- Subject: fix Xtensa assembler bug with -gstabs
I've committed this patch from Sterling Augustine to fix a -gstabs problem in
the Xtensa port of GAS. I ran the testsuite for an xtensa-elf target and
checked that it doesn't cause any problems.
2007-04-02 Sterling Augustine <sterling@tensilica.com>
* config/tc-xtensa.c (xtensa_flush_pending_output): Check
outputting_stabs_line_debug.
Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.79
diff -u -p -r1.79 tc-xtensa.c
--- config/tc-xtensa.c 31 Mar 2007 00:09:34 -0000 1.79
+++ config/tc-xtensa.c 2 Apr 2007 18:53:13 -0000
@@ -5093,6 +5093,15 @@ xtensa_unrecognized_line (int ch)
void
xtensa_flush_pending_output (void)
{
+ /* This line fixes a bug where automatically generated gstabs info
+ separates a function label from its entry instruction, ending up
+ with the literal position between the function label and the entry
+ instruction and crashing code. It only happens with --gstabs and
+ --text-section-literals, and when several other obscure relaxation
+ conditions are met. */
+ if (outputting_stabs_line_debug)
+ return;
+
if (cur_vinsn.inside_bundle)
as_bad (_("missing closing brace"));