aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine Moore <clm@redhat.com>2000-02-24 13:37:02 +0000
committerCatherine Moore <clm@redhat.com>2000-02-24 13:37:02 +0000
commitf5795b0849504dbcaa446d89721b9a3fb4731ff3 (patch)
treea32850b60f71d4679817c4f0127c0680fd3f2015
parent9b9b5cd47d8b8b7a7b8356922bf05aecd5181f39 (diff)
downloadgdb-f5795b0849504dbcaa446d89721b9a3fb4731ff3.zip
gdb-f5795b0849504dbcaa446d89721b9a3fb4731ff3.tar.gz
gdb-f5795b0849504dbcaa446d89721b9a3fb4731ff3.tar.bz2
* config/obj-som.c (obj_pseudo_table): Add "weak".
(obj_som_weak): New routine.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/obj-som.c36
2 files changed, 39 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f21ef47..2b02039 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2000-02-24 Catherine Moore <clm@cygnus.com>
+
+ * config/obj-som.c (obj_pseudo_table): Add "weak".
+ (obj_som_weak): New routine.
+
2000-02-24 Alan Modra <alan@spri.levels.unisa.edu.au>
* config/tc-i386.c (union i386_op): New.
diff --git a/gas/config/obj-som.c b/gas/config/obj-som.c
index 80af18f..65d4ada 100644
--- a/gas/config/obj-som.c
+++ b/gas/config/obj-som.c
@@ -26,11 +26,11 @@
#include "aout/stab_gnu.h"
#include "obstack.h"
-/* SOM does not need any pseudo-ops. */
+static void obj_som_weak PARAMS ((int));
const pseudo_typeS obj_pseudo_table[] =
{
- {NULL}
+ {"weak", obj_som_weak, 0}
};
static int version_seen = 0;
@@ -305,3 +305,35 @@ som_frob_file ()
{
bfd_map_over_sections (stdoutput, adjust_stab_sections, (PTR) 0);
}
+
+static void
+obj_som_weak (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ char *name;
+ int c;
+ symbolS *symbolP;
+
+ do
+ {
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ symbolP = symbol_find_or_make (name);
+ *input_line_pointer = c;
+ SKIP_WHITESPACE ();
+ S_SET_WEAK (symbolP);
+#if 0
+ symbol_get_obj (symbolP)->local = 1;
+#endif
+ if (c == ',')
+ {
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '\n')
+ c = '\n';
+ }
+ }
+ while (c == ',');
+ demand_empty_rest_of_line ();
+}
+