This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
.line/.ln Directive
- To: binutils at sourceware dot cygnus dot com
- Subject: .line/.ln Directive
- From: Tracy dot Kuhrt at microchip dot com
- Date: Thu, 21 Jun 2001 13:08:40 -0700
Given the following assembly source file:
.text
nop
.appline 5
nop
.line 10
nop
.ln 15
.end
I get the error
line_test.s: Assembler messages:
line_test.s:5: Internal error, aborting at /src/gas/config/obj-coff.c line
446 in add_lineno
Please report this bug.
I am using binutils 2.11 with the following configuration.
configure --host=sparc-sun-solaris2.6 --target=sparc-sun-coff
--norecursion
The documentation (as.info) says that .line is supposed to be accepted
outside of a .def/.endef pair.
The .ln directive will also give the same error if I comment out the .line
directive.
I have tracked this down, and I believe that the problem can be resolved
with the following patch,
which sets the appline argument to 1 so that these directives are treated
as an .appline. I am not
sure whether
+ {"ln", obj_coff_ln, 1},
is correct or if should be
+ {"ln", obj_coff_line, 0},
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/gas/config/obj-coff.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 obj-coff.c
--- gas/config/obj-coff.c 2001/04/16 20:14:37 1.1.1.2
+++ gas/config/obj-coff.c 2001/06/21 19:58:13
@@ -944,7 +944,7 @@ obj_coff_line (ignore)
if (def_symbol_in_progress == NULL)
{
/* Probably stabs-style line? */
- obj_coff_ln (0);
+ obj_coff_ln (1);
return;
}
@@ -4594,7 +4594,7 @@ const pseudo_typeS coff_pseudo_table[] =
{"dim", obj_coff_dim, 0},
{"endef", obj_coff_endef, 0},
{"line", obj_coff_line, 0},
- {"ln", obj_coff_ln, 0},
+ {"ln", obj_coff_ln, 1},
#ifdef BFD_ASSEMBLER
{"loc", obj_coff_loc, 0},
#endif
Tracy