aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-07-05 15:23:59 +0000
committerIan Lance Taylor <ian@airs.com>1996-07-05 15:23:59 +0000
commitc0b34702079fa7b586fdd8f58efe569803a20fd0 (patch)
tree62df63b83a052678b7cab9d72163254cc0881a85 /gas
parent3f5d2072fb2525356b8bf035956ced9ced066583 (diff)
downloadgdb-c0b34702079fa7b586fdd8f58efe569803a20fd0.zip
gdb-c0b34702079fa7b586fdd8f58efe569803a20fd0.tar.gz
gdb-c0b34702079fa7b586fdd8f58efe569803a20fd0.tar.bz2
* symbols.c (S_SET_EXTERNAL): Change as_warn to as_bad.
(S_CLEAR_EXTERNAL, S_SET_WEAK): Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/symbols.c43
2 files changed, 41 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0e76c6d..c72031f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 5 11:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * symbols.c (S_SET_EXTERNAL): Change as_warn to as_bad.
+ (S_CLEAR_EXTERNAL, S_SET_WEAK): Likewise.
+
Thu Jul 4 11:59:46 1996 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (VERSION): Set to cygnus-2.7.1.
diff --git a/gas/symbols.c b/gas/symbols.c
index dde84f4..da83e99 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -766,13 +766,33 @@ resolve_symbol_value (symp)
if (seg_left != seg_right
&& seg_left != undefined_section
&& seg_right != undefined_section)
- as_bad ("%s is operation on symbols in different sections",
- S_GET_NAME (symp));
+ {
+ char *file;
+ unsigned int line;
+
+ if (expr_symbol_where (symp, &file, &line))
+ as_bad_where
+ (file, line,
+ "illegal operation on symbols in different sections");
+ else
+ as_bad
+ ("%s set to illegal operation on symbols in different sections",
+ S_GET_NAME (symp));
+ }
if ((S_GET_SEGMENT (symp->sy_value.X_add_symbol)
!= absolute_section)
&& symp->sy_value.X_op != O_subtract)
- as_bad ("%s is illegal operation on non-absolute symbols",
- S_GET_NAME (symp));
+ {
+ char *file;
+ unsigned int line;
+
+ if (expr_symbol_where (symp, &file, &line))
+ as_bad_where (file, line,
+ "illegal operation on non-absolute symbols");
+ else
+ as_bad ("%s set to illegal operation on non-absolute symbols",
+ S_GET_NAME (symp));
+ }
left = S_GET_VALUE (symp->sy_value.X_add_symbol);
right = S_GET_VALUE (symp->sy_value.X_op_symbol);
switch (symp->sy_value.X_op)
@@ -1358,7 +1378,10 @@ S_SET_EXTERNAL (s)
symbolS *s;
{
if ((s->bsym->flags & BSF_WEAK) != 0)
- as_warn ("%s already declared as weak", S_GET_NAME (s));
+ {
+ as_bad ("%s already declared as weak", S_GET_NAME (s));
+ return;
+ }
s->bsym->flags |= BSF_GLOBAL;
s->bsym->flags &= ~(BSF_LOCAL|BSF_WEAK);
}
@@ -1368,7 +1391,10 @@ S_CLEAR_EXTERNAL (s)
symbolS *s;
{
if ((s->bsym->flags & BSF_WEAK) != 0)
- as_warn ("%s already declared as weak", S_GET_NAME (s));
+ {
+ as_bad ("%s already declared as weak", S_GET_NAME (s));
+ return;
+ }
s->bsym->flags |= BSF_LOCAL;
s->bsym->flags &= ~(BSF_GLOBAL|BSF_WEAK);
}
@@ -1378,7 +1404,10 @@ S_SET_WEAK (s)
symbolS *s;
{
if ((s->bsym->flags & BSF_GLOBAL) != 0)
- as_warn ("%s already declared as global", S_GET_NAME (s));
+ {
+ as_bad ("%s already declared as global", S_GET_NAME (s));
+ return;
+ }
s->bsym->flags |= BSF_WEAK;
s->bsym->flags &= ~(BSF_GLOBAL|BSF_LOCAL);
}