summaryrefslogtreecommitdiff
path: root/gas/symbols.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-05-27 16:00:04 +0000
committerRichard Henderson <rth@redhat.com>2003-05-27 16:00:04 +0000
commitb7d6ed970a277da806f01110c032f0e19eab2368 (patch)
tree730f4dcf37bb163e951090a003b0e6b73fd0af5a /gas/symbols.c
parent9e4aeb93074936ab70c362cacd61bf5e737b95a6 (diff)
* symbols.c (temp_label_name): New.
(symbol_temp_new, symbol_temp_new_now, symbol_temp_make): New. (symbol_set_value_now): New. * symbols.h: Prototype them. * dwarf2dbg.c: Use them. (fake_label_name, symbol_new_now, set_symbol_value_now): Remove.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r--gas/symbols.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index 416ff1a8c4..935c6a42bd 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -588,6 +588,29 @@ symbol_make (name)
return (symbolP);
}
+static const char temp_label_name[] = ".L0\001";
+
+symbolS *
+symbol_temp_new (seg, ofs, frag)
+ segT seg;
+ valueT ofs;
+ fragS *frag;
+{
+ return symbol_new (temp_label_name, seg, ofs, frag);
+}
+
+symbolS *
+symbol_temp_new_now ()
+{
+ return symbol_temp_new (now_seg, frag_now_fix (), frag_now);
+}
+
+symbolS *
+symbol_temp_make ()
+{
+ return symbol_make (temp_label_name);
+}
+
/* Implement symbol table lookup.
In: A symbol's name as a string: '\0' can't be part of a symbol name.
Out: NULL if the name was not in the symbol table, else the address
@@ -2061,6 +2084,17 @@ symbol_set_value_expression (s, exp)
s->sy_value = *exp;
}
+/* Set the value of SYM to the current position in the current segment. */
+
+void
+symbol_set_value_now (sym)
+ symbolS *sym;
+{
+ S_SET_SEGMENT (sym, now_seg);
+ S_SET_VALUE (sym, frag_now_fix ());
+ symbol_set_frag (sym, frag_now);
+}
+
/* Set the frag of a symbol. */
void