From b7d6ed970a277da806f01110c032f0e19eab2368 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 27 May 2003 16:00:04 +0000 Subject: * 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. --- gas/symbols.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'gas/symbols.c') diff --git a/gas/symbols.c b/gas/symbols.c index 416ff1a..935c6a4 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 -- cgit v1.1