aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-09-20 14:47:14 +0000
committerNick Clifton <nickc@redhat.com>2002-09-20 14:47:14 +0000
commit7cf108933bd1b2e94d4bd531583060262abd543c (patch)
treeee39eba57b0f70cd0253662a1928ade8cb13266a
parentddd216eaca2c1a4e8f22347abc94b558f89fdeae (diff)
downloadgdb-7cf108933bd1b2e94d4bd531583060262abd543c.zip
gdb-7cf108933bd1b2e94d4bd531583060262abd543c.tar.gz
gdb-7cf108933bd1b2e94d4bd531583060262abd543c.tar.bz2
symbols.c (colon): Do not allow symbols to be created in the absolute section
if WORKING_DOT_WORD is not defined and new_broken_words would require a new frag to be created.
-rw-r--r--gas/ChangeLog3
-rw-r--r--gas/symbols.c15
2 files changed, 10 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 9b4fb4b..1ba475d 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,7 +1,8 @@
2002-09-20 Nick Clifton <nickc@redhat.com>
* symbols.c (colon): Do not allow symbols to be created in the
- absolute section.
+ absolute section if WORKING_DOT_WORD is not defined and
+ new_broken_words would require a new frag to be created.
2002-09-20 Alan Modra <amodra@bigpond.net.au>
diff --git a/gas/symbols.c b/gas/symbols.c
index c84b5b3..feed359 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -287,13 +287,7 @@ colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */
{
register symbolS *symbolP; /* Symbol we are working with. */
- 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
+ /* Sun local labels go out of scope whenever a non-local symbol is
defined. */
if (LOCAL_LABELS_DOLLAR)
{
@@ -319,6 +313,13 @@ colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */
extern const int md_short_jump_size;
extern const int md_long_jump_size;
+
+ if (now_seg == absolute_section)
+ {
+ as_bad (_("cannot define symbol `%s' in absolute section"), sym_name);
+ return NULL;
+ }
+
possible_bytes = (md_short_jump_size
+ new_broken_words * md_long_jump_size);