aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-09-20 06:57:41 +0000
committerNick Clifton <nickc@redhat.com>2002-09-20 06:57:41 +0000
commit9f269a7285fd80b4c191305994b0af006c3fa1f5 (patch)
treea58b7382d8a9ca9d6c812c67d407e743d8c78376 /gas
parent2243deae67bead2b61b88bdd123502d71880e8ad (diff)
downloadgdb-9f269a7285fd80b4c191305994b0af006c3fa1f5.zip
gdb-9f269a7285fd80b4c191305994b0af006c3fa1f5.tar.gz
gdb-9f269a7285fd80b4c191305994b0af006c3fa1f5.tar.bz2
Do not allow symbols to be created in the absolute section.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/symbols.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ab054ab..9b4fb4b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-20 Nick Clifton <nickc@redhat.com>
+
+ * symbols.c (colon): Do not allow symbols to be created in the
+ absolute section.
+
2002-09-20 Alan Modra <amodra@bigpond.net.au>
* expr.c (expr): Simplify foo-foo here.
diff --git a/gas/symbols.c b/gas/symbols.c
index 6d8147c..c84b5b3 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -287,7 +287,13 @@ colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */
{
register symbolS *symbolP; /* Symbol we are working with. */
- /* Sun local labels go out of scope whenever a non-local symbol is
+ if (now_seg == absolute_section)
+ {
+ as_bad (_("cannot define symbol `%s' in absolute section"), sym_name);
+ return NULL;
+ }
+
+ /* Sun local labels go out of scope whenever a non-local symbol is
defined. */
if (LOCAL_LABELS_DOLLAR)
{