From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH] gas: accept custom ".linefile <n> ."
Date: Fri, 11 Nov 2022 08:32:17 +0100 [thread overview]
Message-ID: <40e89395-1438-6cbe-aa37-1a04a724c8c7@suse.com> (raw)
While .linefile is generally intended for gas internal use only, its use
in a source file would better not result in an internal error. Give use
of it outside of any macro(-like) construct the meaning of restoring the
original (physical) input file name.
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -469,13 +469,15 @@ new_logical_line_flags (const char *fnam
/* FIXME: we could check that include nesting is correct. */
break;
case 1 << 3:
- if (line_number < 0 || fname != NULL || next_saved_file == NULL)
+ if (line_number < 0 || fname != NULL)
abort ();
/* PR gas/16908 workaround: Ignore updates when nested inside a macro
expansion. */
if (from_sb_expansion == expanding_nested)
return;
- if (next_saved_file->logical_input_file)
+ if (next_saved_file == NULL)
+ fname = physical_input_file;
+ else if (next_saved_file->logical_input_file)
fname = next_saved_file->logical_input_file;
else
fname = next_saved_file->physical_input_file;
next reply other threads:[~2022-11-11 7:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 7:32 Jan Beulich [this message]
2022-11-14 13:43 ` Nick Clifton
2022-11-14 15:53 ` Jan Beulich
2022-11-14 16:02 ` Nick Clifton
2022-11-14 16:16 ` Jan Beulich
2022-11-15 11:16 ` Nick Clifton
2022-11-15 7:59 ` Jan Beulich
2022-11-15 11:23 ` 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=40e89395-1438-6cbe-aa37-1a04a724c8c7@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
/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).