aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-01-24 01:33:07 +0000
committerSteve Chamberlain <sac@cygnus>1992-01-24 01:33:07 +0000
commit159fbb6088f17a341bcaaac960623cab881b4981 (patch)
treec69140decea14ae69f63a25a1317ac08f941e0ab /gas
parentead077d598197edaa042b228a636890eee9c857c (diff)
downloadgdb-159fbb6088f17a341bcaaac960623cab881b4981.zip
gdb-159fbb6088f17a341bcaaac960623cab881b4981.tar.gz
gdb-159fbb6088f17a341bcaaac960623cab881b4981.tar.bz2
* symbols.c(colon): if a symbol is being multiply defined as exactly
the same value, then don't cause a fatal error. This fixes P00000616 - where a def _foo= . followed by foo: is seen.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog12
-rw-r--r--gas/symbols.c13
2 files changed, 21 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 241cd24..6d13252 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,4 +1,16 @@
+Thu Jan 23 17:30:08 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * symbols.c(colon): if a symbol is being multiply defined as exactly
+ the same value, then don't cause a fatal error. This fixes
+ P00000616 - where a def _foo= . followed by foo: is seen.
+
Wed Jan 8 11:26:40 1992 Steve Chamberlain (sac at rtl.cygnus.com)
+
+ * config/obj-coffbfd.c: lint
+ * config/tc-h8300.c, config/tc-h8300.h: Too Many bug fixes
+ * config/tc-m68k.h, config/tc-sparc.h: Override default
+ listing options to give better effect.
+
Added support for listings
* Makefile.in: include listing.[co]
* as.c: parse -l
diff --git a/gas/symbols.c b/gas/symbols.c
index 9d75ae1..2ac48c1 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -205,7 +205,7 @@ fragS *frag; /* Associated fragment */
obj_symbol_new_hook(symbolP);
#ifdef DEBUG
- verify_symbol_chain(symbol_rootP, symbol_lastP);
+/* verify_symbol_chain(symbol_rootP, symbol_lastP); */
#endif /* DEBUG */
return(symbolP);
@@ -367,8 +367,13 @@ void colon(sym_name) /* just seen "x:" - rattle symbols & frags */
#endif /* OBJ_COFF */
}
} /* if the undefined symbol has no value */
- } else {
- as_fatal("Symbol %s already defined.", sym_name);
+ } else
+ {
+ /* Don't blow up if the definition is the same */
+ if (!(frag_now == symbolP->sy_frag
+ && S_GET_VALUE(symbolP) == obstack_next_free(&frags) - frag_now->fr_literal
+ && S_GET_SEGMENT(symbolP) == now_seg) )
+ as_fatal("Symbol %s already defined.", sym_name);
} /* if this symbol is not yet defined */
} else {
@@ -515,7 +520,7 @@ symbolS **lastPP;
#endif /* SYMBOLS_NEED_BACKPOINTERS */
#ifdef DEBUG
- verify_symbol_chain(*rootPP, *lastPP);
+/* verify_symbol_chain(*rootPP, *lastPP); */
#endif /* DEBUG */
return;