From 8ac9ba6cf25f015e19ff135eeb82f5ec121f29b3 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 14 Aug 2002 16:38:14 +0000 Subject: [PATCH] Catch attempts to create strings in the abs section. --- gas/ChangeLog | 3 +++ gas/read.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index d08f757..60ace3a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,8 @@ 2002-08-14 Nick Clifton + * read.c (stringer): Catch attempts to create strings in the abs + section. + * config/tc-alpha.c: Fix compiling for COFF targets. Some minor formatting tidyups. 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 (); -- 2.7.4