aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-08-14 16:38:14 +0000
committerNick Clifton <nickc@redhat.com>2002-08-14 16:38:14 +0000
commit8ac9ba6cf25f015e19ff135eeb82f5ec121f29b3 (patch)
tree40408ae3e286e9bb71c84a817560e8a507ebdb91 /gas/read.c
parenta7fda4576dd6f1758e0a721cc083b9fc7879c7cb (diff)
downloadgdb-8ac9ba6cf25f015e19ff135eeb82f5ec121f29b3.zip
gdb-8ac9ba6cf25f015e19ff135eeb82f5ec121f29b3.tar.gz
gdb-8ac9ba6cf25f015e19ff135eeb82f5ec121f29b3.tar.bz2
Catch attempts to create strings in the abs section.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/read.c b/gas/read.c
index 23fb900..934d270 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -4564,6 +4564,15 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */
{
c = ','; /* Do loop. */
}
+ /* If we have been switched into the abs_section then we
+ will not have an obstack onto which we can hang strings. */
+ if (now_seg == absolute_section)
+ {
+ as_bad (_("strings must be placed into a section"));
+ c = 0;
+ ignore_rest_of_line ();
+ }
+
while (c == ',' || c == '<' || c == '"')
{
SKIP_WHITESPACE ();