aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-vms.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-09-14 17:58:35 +0000
committerIan Lance Taylor <ian@airs.com>1993-09-14 17:58:35 +0000
commit4f0bccc7d88f5d63a2a295d608a17288e138ad44 (patch)
tree4390fc37d118233fe0106fd78424fcc6edaf3572 /gas/config/obj-vms.c
parent1225fcbd24a9752c33d66b4db24b11855c44c017 (diff)
downloadgdb-4f0bccc7d88f5d63a2a295d608a17288e138ad44.zip
gdb-4f0bccc7d88f5d63a2a295d608a17288e138ad44.tar.gz
gdb-4f0bccc7d88f5d63a2a295d608a17288e138ad44.tar.bz2
Some more gcc lint, and:
* read.c (change_to_section): Removed. This is now done by subseg_new. (get_stab_string_offset): Rearranged somewhat. Create the section using subseg_new. Store the string index in seg_info, rather than in a static variable. Force the first string to be empty. Use frag_more rather than FRAG_APPEND_1_CHAR. (s_stab_generic): Rewrote. * subsegs.h (segment_info_type): Added stabu union. * subsegs.c (subseg_new): Initialize stab_string_size to 0. * config/obj-aout.c: Don't include aout/stab_gnu.h. (obj_aout_stab, obj_aout_desc): Removed. (obj_pseudo_table): Removed desc and stabX entries. * config/obj-bout.c: Same changes as config/obj-aout.c. * config/obj-bout.h (S_SET_TYPE): Define. (tc_bout_fix_to_chars): Declare. * config/obj-coff.c (obj_coff_stab): Removed. (obj_pseudo_table): Removed desc and stabX entries. * config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define. * config/obj-coffbfd.c (current_stab_symbol): Removed. * config/obj-coffbfd.h (obj_symbol_type): Removed n_strx, n_type, n_other, n_desc and n_value fields. (S_{S,G}ET_{OFFSET,OTHER,TYPE,DESC}): Removed. (MAKE_STAB_SYMBOL): Removed. * config/obj-ecoff.c (obj_ecoff_stab): Renamed to ecoff_stab. Changed arguments and removed parsing code. (obj_pseudo_table): Removed stabX entries. * config/obj-ecoff.h (ecoff_stab): Declare. (OBJ_PROCESS_STAB): Define. * config/obj-elf.c: Don't include aout/stab_gnu.h. (obj_elf_stab, obj_elf_xstab, obj_elf_desc, elf_stab_symbol_string, elf_stab_symbol, obj_elf_stab_generic): Removed. (obj_pseudo_table): Removed desc, stabX and xstabs entries. (obj_elf_version): Use subseg_new, not bfd_make_section. Don't set SEC_LOAD for .note section. (adjust_stab_sections): Get frag pointer from seg_info, rather than looking through frags. * config/obj-elf.h (S_{S,G}ET_{OTHER,TYPE,DESC}): Removed. (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB): Define. * config/obj-vms.c (obj_aout_stab): Removed. (obj_pseudo_table): Removed stabX entries. * config/obj-vms.h (S_SET_TYPE): Define.
Diffstat (limited to 'gas/config/obj-vms.c')
-rw-r--r--gas/config/obj-vms.c155
1 files changed, 0 insertions, 155 deletions
diff --git a/gas/config/obj-vms.c b/gas/config/obj-vms.c
index 2ea43f5..4bbb67d 100644
--- a/gas/config/obj-vms.c
+++ b/gas/config/obj-vms.c
@@ -332,165 +332,10 @@ s_const ()
demand_empty_rest_of_line ();
}
-/*
- * stab()
- *
- * Handle .stabX directives, which used to be open-coded.
- * So much creeping featurism overloaded the semantics that we decided
- * to put all .stabX thinking in one place. Here.
- *
- * We try to make any .stabX directive legal. Other people's AS will often
- * do assembly-time consistency checks: eg assigning meaning to n_type bits
- * and "protecting" you from setting them to certain values. (They also zero
- * certain bits before emitting symbols. Tut tut.)
- *
- * If an expression is not absolute we either gripe or use the relocation
- * information. Other people's assemblers silently forget information they
- * don't need and invent information they need that you didn't supply.
- *
- * .stabX directives always make a symbol table entry. It may be junk if
- * the rest of your .stabX directive is malformed.
- */
-static void
-obj_aout_stab (what)
- int what;
-{
-#ifndef NO_LISTING
- extern int listing;
-#endif /* NO_LISTING */
-
- register symbolS *symbolP = 0;
- register char *string;
- int saved_type = 0;
- int length;
- int goof; /* TRUE if we have aborted. */
- long longint;
-
-/*
- * Enter with input_line_pointer pointing past .stabX and any following
- * whitespace.
- */
- goof = 0; /* JF who forgot this?? */
- if (what == 's')
- {
- string = demand_copy_C_string (&length);
- SKIP_WHITESPACE ();
- if (*input_line_pointer == ',')
- input_line_pointer++;
- else
- {
- as_bad ("I need a comma after symbol's name");
- goof = 1;
- }
- }
- else
- string = "";
-
-/*
- * Input_line_pointer->after ','. String->symbol name.
- */
- if (!goof)
- {
- symbolP = symbol_new (string,
- SEG_UNKNOWN,
- 0,
- (struct frag *) 0);
- switch (what)
- {
- case 'd':
- S_SET_NAME (symbolP, NULL); /* .stabd feature. */
- S_SET_VALUE (symbolP, obstack_next_free (&frags) - frag_now->fr_literal);
- symbolP->sy_frag = frag_now;
- break;
-
- case 'n':
- symbolP->sy_frag = &zero_address_frag;
- break;
-
- case 's':
- symbolP->sy_frag = &zero_address_frag;
- break;
-
- default:
- BAD_CASE (what);
- break;
- }
-
- if (get_absolute_expression_and_terminator (&longint) == ',')
- symbolP->sy_symbol.n_type = saved_type = longint;
- else
- {
- as_bad ("I want a comma after the n_type expression");
- goof = 1;
- input_line_pointer--; /* Backup over a non-',' char. */
- }
- }
-
- if (!goof)
- {
- if (get_absolute_expression_and_terminator (&longint) == ',')
- S_SET_OTHER (symbolP, longint);
- else
- {
- as_bad ("I want a comma after the n_other expression");
- goof = 1;
- input_line_pointer--; /* Backup over a non-',' char. */
- }
- }
-
- if (!goof)
- {
- S_SET_DESC (symbolP, get_absolute_expression ());
- if (what == 's' || what == 'n')
- {
- if (*input_line_pointer != ',')
- {
- as_bad ("I want a comma after the n_desc expression");
- goof = 1;
- }
- else
- {
- input_line_pointer++;
- }
- }
- }
-
- if ((!goof) && (what == 's' || what == 'n'))
- {
- pseudo_set (symbolP);
- symbolP->sy_symbol.n_type = saved_type;
- }
-
-#ifndef NO_LISTING
- if (listing && !goof)
- {
- if (symbolP->sy_symbol.n_type == N_SLINE)
- {
-
- listing_source_line(symbolP->sy_symbol.n_desc);
- }
- else if (symbolP->sy_symbol.n_type == N_SO
- || symbolP->sy_symbol.n_type == N_SOL)
- {
- listing_source_file(string);
- }
- }
-#endif
-
- if (goof)
- ignore_rest_of_line ();
- else
- demand_empty_rest_of_line ();
-} /* obj_aout_stab() */
-
const pseudo_typeS obj_pseudo_table[] =
{
- {"stabd", obj_aout_stab, 'd'},/* stabs */
- {"stabn", obj_aout_stab, 'n'},/* stabs */
- {"stabs", obj_aout_stab, 's'},/* stabs */
{"const", s_const, 0},
{0, 0, 0},
-
}; /* obj_pseudo_table */
int