From: nickc Date: Fri, 20 Sep 2002 06:57:41 +0000 (+0000) Subject: Do not allow symbols to be created in the absolute section. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5205f1f1366827d3071f4bd8c35e17ada04be5dd;p=pf3gnuchains%2Fpf3gnuchains3x.git Do not allow symbols to be created in the absolute section. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index ab054abdb0..9b4fb4be93 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2002-09-20 Nick Clifton + + * symbols.c (colon): Do not allow symbols to be created in the + absolute section. + 2002-09-20 Alan Modra * expr.c (expr): Simplify foo-foo here. diff --git a/gas/symbols.c b/gas/symbols.c index 6d8147ce84..c84b5b3a00 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) {