/* Current location as indicated by the most recent .loc directive. */
static struct dwarf2_line_info current;
-/* Fake label name. */
-static char const fake_label_name[] = ".L0\001";
-
/* The size of an address on the target. */
static unsigned int sizeof_address;
\f
static void out_four PARAMS ((int));
static void out_abbrev PARAMS ((int, int));
static void out_uleb128 PARAMS ((addressT));
-static symbolS *symbol_new_now PARAMS ((void));
-static void set_symbol_value_now PARAMS ((symbolS *));
static offsetT get_frag_fix PARAMS ((fragS *));
static void out_set_addr PARAMS ((segT, fragS *, addressT));
static int size_inc_line_addr PARAMS ((int, addressT));
out_uleb128 (form);
}
-/* Create a new fake symbol whose value is the current position. */
-
-static symbolS *
-symbol_new_now ()
-{
- return symbol_new (fake_label_name, now_seg, frag_now_fix (), frag_now);
-}
-
-/* Set the value of SYM to the current position in the current segment. */
-
-static void
-set_symbol_value_now (sym)
- symbolS *sym;
-{
- S_SET_SEGMENT (sym, now_seg);
- S_SET_VALUE (sym, frag_now_fix ());
- symbol_set_frag (sym, frag_now);
-}
-
/* Get the size of a fragment. */
static offsetT
expressionS expr;
symbolS *sym;
- sym = symbol_new (fake_label_name, seg, ofs, frag);
+ sym = symbol_temp_new (seg, ofs, frag);
out_opcode (DW_LNS_extended_op);
out_uleb128 (sizeof_address + 1);
expressionS expr;
int max_chars;
- to_sym = symbol_new (fake_label_name, seg, to_ofs, to_frag);
- from_sym = symbol_new (fake_label_name, seg, from_ofs, from_frag);
+ to_sym = symbol_temp_new (seg, to_ofs, to_frag);
+ from_sym = symbol_temp_new (seg, from_ofs, from_frag);
expr.X_op = O_subtract;
expr.X_add_symbol = to_sym;
subseg_set (line_seg, 0);
- line_start = symbol_new_now ();
- prologue_end = symbol_make (fake_label_name);
- line_end = symbol_make (fake_label_name);
+ line_start = symbol_temp_new_now ();
+ prologue_end = symbol_temp_make ();
+ line_end = symbol_temp_make ();
/* Total length of the information for this compilation unit. */
expr.X_op = O_subtract;
out_file_list ();
- set_symbol_value_now (prologue_end);
+ symbol_set_value_now (prologue_end);
/* For each section, emit a statement program. */
for (s = all_segs; s; s = s->next)
process_entries (s->seg, s->head->head);
- set_symbol_value_now (line_end);
+ symbol_set_value_now (line_end);
}
/* Emit data for .debug_aranges. */
symbolS *beg, *end;
frag = first_frag_for_seg (s->seg);
- beg = symbol_new (fake_label_name, s->seg, 0, frag);
+ beg = symbol_temp_new (s->seg, 0, frag);
s->text_start = beg;
frag = last_frag_for_seg (s->seg);
- end = symbol_new (fake_label_name, s->seg, get_frag_fix (frag), frag);
+ end = symbol_temp_new (s->seg, get_frag_fix (frag), frag);
s->text_end = end;
expr.X_op = O_symbol;
subseg_set (info_seg, 0);
- info_start = symbol_new_now ();
- info_end = symbol_make (fake_label_name);
+ info_start = symbol_temp_new_now ();
+ info_end = symbol_temp_make ();
/* Compilation Unit length. */
expr.X_op = O_subtract;
dwarf2 draft has no standard code for assembler. */
out_two (DW_LANG_Mips_Assembler);
- set_symbol_value_now (info_end);
+ symbol_set_value_now (info_end);
}
void
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
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
fragS * frag));
struct local_symbol *local_symbol_make PARAMS ((const char *name, segT section,
valueT value, fragS * frag));
+symbolS *symbol_temp_new PARAMS ((segT, valueT, fragS *));
+symbolS *symbol_temp_new_now PARAMS ((void));
+symbolS *symbol_temp_make PARAMS ((void));
+
symbolS *colon PARAMS ((const char *sym_name));
void local_colon PARAMS ((int n));
void symbol_begin PARAMS ((void));
extern expressionS *symbol_get_value_expression PARAMS ((symbolS *));
extern void symbol_set_value_expression PARAMS ((symbolS *,
const expressionS *));
+extern void symbol_set_value_now PARAMS ((symbolS *));
extern void symbol_set_frag PARAMS ((symbolS *, fragS *));
extern fragS *symbol_get_frag PARAMS ((symbolS *));
extern void symbol_mark_used PARAMS ((symbolS *));