From: Tracy Kuhrt <Tracy.Kuhrt@microchip.com>
To: binutils List <binutils@sourceware.cygnus.com>
Subject: obj_coff_loc Internal Error
Date: Fri, 07 Sep 2001 11:38:00 -0000 [thread overview]
Message-ID: <3B99142C.5F37716B@microchip.com> (raw)
The following creates an internal error in obj_coff_loc:
.loc 1, 200
/home/users/kuhrtt/tmp/loc.s: Assembler messages:
/home/users/kuhrtt/tmp/loc.s:1: Error: Rest of line ignored. First
ignored character is `,'.
/home/users/kuhrtt/tmp/loc.s:1: Internal error, aborting at
/opt/gnudev/roadrunner/src/gnu/acme/gas/config/obj-coff.c line 446 in
add_lineno
The following configure line was used to configure binutils:
../src/configure --target=sparc-sun-coff
There are actually two problems here
1. Even though loc accepts two arguments, it does not allow for the
arguments to be separated by a comma.
2. The internal error.
Following is a patch that I think solves the problems. NOTE: I have
moved the add_lineno before the listing code. I am not sure if this is
correct.
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/gas/config/obj-coff.c,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 obj-coff.c
--- gas/config/obj-coff.c 27 Jul 2001 21:46:28 -0000 1.1.1.4
+++ gas/config/obj-coff.c 7 Sep 2001 18:14:11 -0000
@@ -545,10 +545,24 @@ obj_coff_loc (ignore)
/* Skip the file number. */
SKIP_WHITESPACE ();
get_absolute_expression ();
+
+ /* Skip the comma if it exists; otherwise, give warning. */
+ if (*input_line_pointer == ',')
+ input_line_pointer++;
+ else
+ as_warn (_("missing comma assumed."));
+
SKIP_WHITESPACE ();
lineno = get_absolute_expression ();
+ /* If there is no lineno symbol, treat a .loc directive as if it were
a
+ .appline directive. */
+ if (current_lineno_sym == NULL)
+ new_logical_line ((char *) NULL, lineno - 1);
+ else
+ add_lineno (frag_now, frag_now_fix (), lineno);
+
#ifndef NO_LISTING
{
extern int listing;
@@ -562,8 +576,6 @@ obj_coff_loc (ignore)
#endif
demand_empty_rest_of_line ();
-
- add_lineno (frag_now, frag_now_fix (), lineno);
}
/* Handle the .ident pseudo-op. */
next reply other threads:[~2001-09-07 11:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-07 11:38 Tracy Kuhrt [this message]
2001-09-10 10:37 ` Nick Clifton
2001-09-10 10:54 ` Tracy Kuhrt
2001-09-10 13:21 ` Nick Clifton
2001-09-10 13:35 ` Tracy Kuhrt
2001-09-10 15:43 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B99142C.5F37716B@microchip.com \
--to=tracy.kuhrt@microchip.com \
--cc=binutils@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).