aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2005-11-04 19:45:25 +0000
committerAlexandre Oliva <aoliva@redhat.com>2005-11-04 19:45:25 +0000
commitb54788f893981969adb5e98b9e1dbe9588dc0cfd (patch)
tree166f33af95b065b288b7045abf8ade0aa8426319 /gas/read.c
parent384a9dda99bba1f6e95e154df7450b580a2453e3 (diff)
downloadgdb-b54788f893981969adb5e98b9e1dbe9588dc0cfd.zip
gdb-b54788f893981969adb5e98b9e1dbe9588dc0cfd.tar.gz
gdb-b54788f893981969adb5e98b9e1dbe9588dc0cfd.tar.bz2
gas/ChangeLog:
* read.c (s_weakref): Do not permit redefinitions. * symbols.c (colon): Do not permit redefinitions of equated symbols. gas/testsuite/ChangeLog: * gas/all/gas.exp: Remove weakref xfail. Run weakref4.s. * gas/all/weakref1.s: Move redefinition bits to... * gas/all/weakref4.s: ... new file. * gas/all/weakref1.d: Remove command moved to weakref1u. Adjust remaining command for leading tabs. Regenerate. * gas/all/weakref1l.d: Regenerate. * gas/all/weakref1u.d: Likewise. * gas/all/wealref1w.d: Likewise.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/read.c b/gas/read.c
index c85ca5f..bf9346e 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -3178,6 +3178,14 @@ s_weakref (int ignore ATTRIBUTE_UNUSED)
symbolP = symbol_find_or_make (name);
+ if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
+ {
+ as_bad (_("symbol `%s' is already defined"), name);
+ *end_name = delim;
+ ignore_rest_of_line ();
+ return;
+ }
+
*end_name = delim;
SKIP_WHITESPACE ();