summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2008-11-12 02:42:46 +0000
committerHans-Peter Nilsson <hp@axis.com>2008-11-12 02:42:46 +0000
commit89f3b56e10878639a9c6cbd4e16b71b4b4c807b0 (patch)
tree7037c5dd124cb6fe921dc0b92bb9c83fdc2c073a
parent47753fdda576ba18dc978a83520875ddc955c572 (diff)
downloadbinutils-redhat-89f3b56e10878639a9c6cbd4e16b71b4b4c807b0.tar.gz
PR gas/7025
* input-scrub.c (input_scrub_include_sb): Make the position after the input have defined contents, a 0 character.
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/input-scrub.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1d872216a1..c8731837aa 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,9 @@
2008-11-12 Hans-Peter Nilsson <hp@axis.com>
+ PR gas/7025
+ * input-scrub.c (input_scrub_include_sb): Make the position
+ after the input have defined contents, a 0 character.
+
* config/tc-cris.c (cris_relax_frag): Add missing case for
ENCODE_RELAX (STATE_COND_BRANCH_PIC, STATE_DWORD).
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index 21a4651454..d4cf21783f 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -283,6 +283,12 @@ input_scrub_include_sb (sb *from, char *position, int is_expansion)
sb_add_char (&from_sb, '\n');
}
sb_scrub_and_add_sb (&from_sb, from);
+
+ /* Make sure the parser looks at defined contents when it scans for
+ e.g. end-of-line at the end of a macro. */
+ sb_add_char (&from_sb, 0);
+ from_sb.len--;
+
sb_index = 1;
/* These variables are reset by input_scrub_push. Restore them