mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
* config/tc-vax.c (tc_aout_fix_to_chars): Local variable NBYTES_R_LENGTH now
const. * config/obj-*.c, config/tc-*.c: Omit superfluous "return" statements at ends of functions. Don't check for null return from hash_new, since it won't return at all if there's no memory available. Also, check for null return from hash_insert, rather than zero-length string, as success indicator.
This commit is contained in:
@ -208,8 +208,7 @@ obj_symbol_new_hook (symbolP)
|
|||||||
{
|
{
|
||||||
S_SET_OTHER (symbolP, 0);
|
S_SET_OTHER (symbolP, 0);
|
||||||
S_SET_DESC (symbolP, 0);
|
S_SET_DESC (symbolP, 0);
|
||||||
return;
|
}
|
||||||
} /* obj_symbol_new_hook() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_bout_line (ignore)
|
obj_bout_line (ignore)
|
||||||
@ -225,8 +224,7 @@ obj_bout_line (ignore)
|
|||||||
void
|
void
|
||||||
obj_read_begin_hook ()
|
obj_read_begin_hook ()
|
||||||
{
|
{
|
||||||
return;
|
}
|
||||||
} /* obj_read_begin_hook() */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
obj_crawl_symbol_chain (headers)
|
obj_crawl_symbol_chain (headers)
|
||||||
@ -302,9 +300,7 @@ obj_crawl_symbol_chain (headers)
|
|||||||
} /* for each symbol */
|
} /* for each symbol */
|
||||||
|
|
||||||
H_SET_SYMBOL_TABLE_SIZE (headers, symbol_number);
|
H_SET_SYMBOL_TABLE_SIZE (headers, symbol_number);
|
||||||
|
}
|
||||||
return;
|
|
||||||
} /* obj_crawl_symbol_chain() */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find strings by crawling along symbol table chain.
|
* Find strings by crawling along symbol table chain.
|
||||||
@ -329,8 +325,6 @@ obj_emit_strings (where)
|
|||||||
if (S_GET_NAME (symbolP))
|
if (S_GET_NAME (symbolP))
|
||||||
append (where, S_GET_NAME (symbolP), (unsigned long) (strlen (S_GET_NAME (symbolP)) + 1));
|
append (where, S_GET_NAME (symbolP), (unsigned long) (strlen (S_GET_NAME (symbolP)) + 1));
|
||||||
} /* walk symbol chain */
|
} /* walk symbol chain */
|
||||||
|
}
|
||||||
return;
|
|
||||||
} /* obj_emit_strings() */
|
|
||||||
|
|
||||||
/* end of obj-bout.c */
|
/* end of obj-bout.c */
|
||||||
|
@ -714,9 +714,7 @@ obj_symbol_new_hook (symbolP)
|
|||||||
SF_SET_STRING (symbolP);
|
SF_SET_STRING (symbolP);
|
||||||
if (!underscore && S_IS_LOCAL (symbolP))
|
if (!underscore && S_IS_LOCAL (symbolP))
|
||||||
SF_SET_LOCAL (symbolP);
|
SF_SET_LOCAL (symbolP);
|
||||||
|
}
|
||||||
return;
|
|
||||||
} /* obj_symbol_new_hook() */
|
|
||||||
|
|
||||||
/* stack stuff */
|
/* stack stuff */
|
||||||
static stack *
|
static stack *
|
||||||
@ -822,8 +820,7 @@ obj_coff_ln (appline)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_line() */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* def()
|
* def()
|
||||||
@ -896,8 +893,7 @@ DEFUN (obj_coff_def, (what),
|
|||||||
*input_line_pointer = name_end;
|
*input_line_pointer = name_end;
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_def() */
|
|
||||||
|
|
||||||
unsigned int dim_index;
|
unsigned int dim_index;
|
||||||
|
|
||||||
@ -1067,7 +1063,6 @@ obj_coff_endef (ignore)
|
|||||||
|
|
||||||
def_symbol_in_progress = NULL;
|
def_symbol_in_progress = NULL;
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1108,8 +1103,7 @@ obj_coff_dim (ignore)
|
|||||||
} /* for each dimension */
|
} /* for each dimension */
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_dim() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_coff_line (ignore)
|
obj_coff_line (ignore)
|
||||||
@ -1143,8 +1137,7 @@ obj_coff_line (ignore)
|
|||||||
SA_SET_SYM_LNNO (def_symbol_in_progress, line_base);
|
SA_SET_SYM_LNNO (def_symbol_in_progress, line_base);
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_line() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_coff_size (ignore)
|
obj_coff_size (ignore)
|
||||||
@ -1160,8 +1153,7 @@ obj_coff_size (ignore)
|
|||||||
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
|
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
|
||||||
SA_SET_SYM_SIZE (def_symbol_in_progress, get_absolute_expression ());
|
SA_SET_SYM_SIZE (def_symbol_in_progress, get_absolute_expression ());
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_size() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_coff_scl (ignore)
|
obj_coff_scl (ignore)
|
||||||
@ -1176,8 +1168,7 @@ obj_coff_scl (ignore)
|
|||||||
|
|
||||||
S_SET_STORAGE_CLASS (def_symbol_in_progress, get_absolute_expression ());
|
S_SET_STORAGE_CLASS (def_symbol_in_progress, get_absolute_expression ());
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_scl() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_coff_tag (ignore)
|
obj_coff_tag (ignore)
|
||||||
@ -1209,8 +1200,7 @@ obj_coff_tag (ignore)
|
|||||||
*input_line_pointer = name_end;
|
*input_line_pointer = name_end;
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_tag() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_coff_type (ignore)
|
obj_coff_type (ignore)
|
||||||
@ -1232,8 +1222,7 @@ obj_coff_type (ignore)
|
|||||||
} /* is a function */
|
} /* is a function */
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_type() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
obj_coff_val (ignore)
|
obj_coff_val (ignore)
|
||||||
@ -1293,8 +1282,7 @@ obj_coff_val (ignore)
|
|||||||
} /* if symbol based */
|
} /* if symbol based */
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* obj_coff_val() */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maintain a list of the tagnames of the structres.
|
* Maintain a list of the tagnames of the structres.
|
||||||
@ -1304,8 +1292,7 @@ static void
|
|||||||
tag_init ()
|
tag_init ()
|
||||||
{
|
{
|
||||||
tag_hash = hash_new ();
|
tag_hash = hash_new ();
|
||||||
return;
|
}
|
||||||
} /* tag_init() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tag_insert (name, symbolP)
|
tag_insert (name, symbolP)
|
||||||
@ -1319,8 +1306,7 @@ tag_insert (name, symbolP)
|
|||||||
as_fatal ("Inserting \"%s\" into structure table failed: %s",
|
as_fatal ("Inserting \"%s\" into structure table failed: %s",
|
||||||
name, error_string);
|
name, error_string);
|
||||||
}
|
}
|
||||||
return;
|
}
|
||||||
} /* tag_insert() */
|
|
||||||
|
|
||||||
static symbolS *
|
static symbolS *
|
||||||
tag_find_or_make (name)
|
tag_find_or_make (name)
|
||||||
@ -1361,9 +1347,7 @@ obj_read_begin_hook ()
|
|||||||
know (SYMESZ == AUXESZ);
|
know (SYMESZ == AUXESZ);
|
||||||
#endif
|
#endif
|
||||||
tag_init ();
|
tag_init ();
|
||||||
|
}
|
||||||
return;
|
|
||||||
} /* obj_read_begin_hook() */
|
|
||||||
|
|
||||||
/* This function runs through the symbol table and puts all the
|
/* This function runs through the symbol table and puts all the
|
||||||
externals onto another chain */
|
externals onto another chain */
|
||||||
@ -1680,8 +1664,6 @@ DEFUN (crawl_symbols, (h, abfd),
|
|||||||
H_SET_SYMBOL_TABLE_SIZE (h, tie_tags ());
|
H_SET_SYMBOL_TABLE_SIZE (h, tie_tags ());
|
||||||
know (symbol_externP == NULL);
|
know (symbol_externP == NULL);
|
||||||
know (symbol_extern_lastP == NULL);
|
know (symbol_extern_lastP == NULL);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1712,7 +1694,6 @@ DEFUN (w_strings, (where),
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -377,8 +377,7 @@ vms_resolve_symbol_redef (sym)
|
|||||||
void
|
void
|
||||||
obj_read_begin_hook ()
|
obj_read_begin_hook ()
|
||||||
{
|
{
|
||||||
return;
|
}
|
||||||
} /* obj_read_begin_hook() */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
obj_crawl_symbol_chain (headers)
|
obj_crawl_symbol_chain (headers)
|
||||||
@ -3423,10 +3422,6 @@ VMS_Modify_Psect_Attributes (Name, Attribute_Pointer)
|
|||||||
if (*Name == '_')
|
if (*Name == '_')
|
||||||
Name++;
|
Name++;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* Done
|
|
||||||
*/
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,7 +168,6 @@ s_use (ignore)
|
|||||||
|
|
||||||
as_bad ("Unknown segment type");
|
as_bad ("Unknown segment type");
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -176,7 +175,6 @@ s_data1 ()
|
|||||||
{
|
{
|
||||||
subseg_set (SEG_DATA, 1);
|
subseg_set (SEG_DATA, 1);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* OBJ_COFF */
|
#endif /* OBJ_COFF */
|
||||||
@ -349,7 +347,6 @@ md_begin ()
|
|||||||
void
|
void
|
||||||
md_end ()
|
md_end ()
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Assemble a single instruction. Its label has already been handled
|
/* Assemble a single instruction. Its label has already been handled
|
||||||
@ -874,7 +871,6 @@ md_apply_fix (fixP, val)
|
|||||||
as_bad ("bad relocation type: 0x%02x", fixP->fx_r_type);
|
as_bad ("bad relocation type: 0x%02x", fixP->fx_r_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OBJ_COFF
|
#ifdef OBJ_COFF
|
||||||
@ -1000,7 +996,6 @@ print_insn (insn)
|
|||||||
fprintf (stderr, "\t\tX_add_number = %d\n",
|
fprintf (stderr, "\t\tX_add_number = %d\n",
|
||||||
insn->exp.X_add_number);
|
insn->exp.X_add_number);
|
||||||
fprintf (stderr, "}\n");
|
fprintf (stderr, "}\n");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1322,8 +1322,6 @@ md_begin ()
|
|||||||
pa_spaces_begin ();
|
pa_spaces_begin ();
|
||||||
|
|
||||||
op_hash = hash_new ();
|
op_hash = hash_new ();
|
||||||
if (op_hash == NULL)
|
|
||||||
as_fatal ("Virtual memory exhausted");
|
|
||||||
|
|
||||||
while (i < NUMOPCODES)
|
while (i < NUMOPCODES)
|
||||||
{
|
{
|
||||||
@ -1362,7 +1360,6 @@ md_begin ()
|
|||||||
void
|
void
|
||||||
md_end ()
|
md_end ()
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Assemble a single instruction storing it into a frag. */
|
/* Assemble a single instruction storing it into a frag. */
|
||||||
@ -2436,7 +2433,6 @@ pa_ip (str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
the_insn.opcode = opcode;
|
the_insn.opcode = opcode;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Turn a string in input_line_pointer into a floating point constant of type
|
/* Turn a string in input_line_pointer into a floating point constant of type
|
||||||
@ -3964,7 +3960,6 @@ pa_block (z)
|
|||||||
|
|
||||||
pa_undefine_label ();
|
pa_undefine_label ();
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle a .CALL pseudo-op. This involves storing away information
|
/* Handle a .CALL pseudo-op. This involves storing away information
|
||||||
@ -3977,7 +3972,6 @@ pa_call (unused)
|
|||||||
{
|
{
|
||||||
pa_call_args (&last_call_desc);
|
pa_call_args (&last_call_desc);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do the dirty work of building a call descriptor which describes
|
/* Do the dirty work of building a call descriptor which describes
|
||||||
@ -4242,7 +4236,6 @@ pa_callinfo (unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Switch into the code subspace. */
|
/* Switch into the code subspace. */
|
||||||
@ -4269,7 +4262,6 @@ pa_code (unused)
|
|||||||
SPACE_DEFINED (sdchain) = 1;
|
SPACE_DEFINED (sdchain) = 1;
|
||||||
subseg_set (text_section, SUBSEG_CODE);
|
subseg_set (text_section, SUBSEG_CODE);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is different than the standard GAS s_comm(). On HP9000/800 machines,
|
/* This is different than the standard GAS s_comm(). On HP9000/800 machines,
|
||||||
@ -4330,7 +4322,6 @@ pa_end (unused)
|
|||||||
int unused;
|
int unused;
|
||||||
{
|
{
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process a .ENTER pseudo-op. This is not supported. */
|
/* Process a .ENTER pseudo-op. This is not supported. */
|
||||||
@ -4339,7 +4330,6 @@ pa_enter (unused)
|
|||||||
int unused;
|
int unused;
|
||||||
{
|
{
|
||||||
abort ();
|
abort ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process a .ENTRY pseudo-op. .ENTRY marks the beginning of the
|
/* Process a .ENTRY pseudo-op. .ENTRY marks the beginning of the
|
||||||
@ -4381,8 +4371,6 @@ pa_entry (unused)
|
|||||||
(char *) &last_call_info->ci_unwind.descriptor);
|
(char *) &last_call_info->ci_unwind.descriptor);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle a .EQU pseudo-op. */
|
/* Handle a .EQU pseudo-op. */
|
||||||
@ -4410,7 +4398,6 @@ pa_equ (reg)
|
|||||||
|
|
||||||
pa_undefine_label ();
|
pa_undefine_label ();
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper function. Does processing for the end of a function. This
|
/* Helper function. Does processing for the end of a function. This
|
||||||
@ -4471,7 +4458,6 @@ pa_exit (unused)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process a .EXPORT directive. This makes functions external
|
/* Process a .EXPORT directive. This makes functions external
|
||||||
@ -4512,7 +4498,6 @@ pa_export (unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Helper function to process arguments to a .EXPORT pseudo-op. */
|
/* Helper function to process arguments to a .EXPORT pseudo-op. */
|
||||||
@ -4694,7 +4679,6 @@ pa_import (unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle a .LABEL pseudo-op. */
|
/* Handle a .LABEL pseudo-op. */
|
||||||
@ -4725,7 +4709,6 @@ pa_label (unused)
|
|||||||
ignore_rest_of_line ();
|
ignore_rest_of_line ();
|
||||||
}
|
}
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle a .LEAVE pseudo-op. This is not supported yet. */
|
/* Handle a .LEAVE pseudo-op. This is not supported yet. */
|
||||||
@ -4745,7 +4728,6 @@ pa_origin (unused)
|
|||||||
{
|
{
|
||||||
s_org (0);
|
s_org (0);
|
||||||
pa_undefine_label ();
|
pa_undefine_label ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle a .PARAM pseudo-op. This is much like a .EXPORT, except it
|
/* Handle a .PARAM pseudo-op. This is much like a .EXPORT, except it
|
||||||
@ -4781,7 +4763,6 @@ pa_param (unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle a .PROC pseudo-op. It is used to mark the beginning
|
/* Handle a .PROC pseudo-op. It is used to mark the beginning
|
||||||
@ -4847,7 +4828,6 @@ pa_proc (unused)
|
|||||||
}
|
}
|
||||||
|
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process the syntatical end of a procedure. Make sure all the
|
/* Process the syntatical end of a procedure. Make sure all the
|
||||||
@ -4875,7 +4855,6 @@ pa_procend (unused)
|
|||||||
|
|
||||||
within_procedure = FALSE;
|
within_procedure = FALSE;
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse the parameters to a .SPACE directive; if CREATE_FLAG is nonzero,
|
/* Parse the parameters to a .SPACE directive; if CREATE_FLAG is nonzero,
|
||||||
@ -5107,7 +5086,6 @@ pa_space (unused)
|
|||||||
sd_chain->sd_last_subseg);
|
sd_chain->sd_last_subseg);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Switch to a new space. (I think). FIXME. */
|
/* Switch to a new space. (I think). FIXME. */
|
||||||
@ -5134,7 +5112,6 @@ pa_spnum (unused)
|
|||||||
|
|
||||||
*input_line_pointer = c;
|
*input_line_pointer = c;
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If VALUE is an exact power of two between zero and 2^31, then
|
/* If VALUE is an exact power of two between zero and 2^31, then
|
||||||
@ -5378,7 +5355,6 @@ pa_subspace (unused)
|
|||||||
subseg_set (current_subspace->ssd_seg, current_subspace->ssd_subseg);
|
subseg_set (current_subspace->ssd_seg, current_subspace->ssd_subseg);
|
||||||
}
|
}
|
||||||
SUBSPACE_DEFINED (current_subspace) = 1;
|
SUBSPACE_DEFINED (current_subspace) = 1;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -6251,8 +6227,6 @@ hppa_tc_make_sections (abfd)
|
|||||||
|
|
||||||
/* Switch back to the original segment. */
|
/* Switch back to the original segment. */
|
||||||
subseg_set (save_seg, save_subseg);
|
subseg_set (save_seg, save_subseg);
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make the symbol extension section. */
|
/* Make the symbol extension section. */
|
||||||
|
@ -188,8 +188,6 @@ md_begin ()
|
|||||||
/* initialize hash table */
|
/* initialize hash table */
|
||||||
|
|
||||||
op_hash = hash_new ();
|
op_hash = hash_new ();
|
||||||
if (op_hash == NULL)
|
|
||||||
as_fatal ("Could not initialize hash table");
|
|
||||||
|
|
||||||
/* loop until you see the end of the list */
|
/* loop until you see the end of the list */
|
||||||
|
|
||||||
@ -1228,7 +1226,6 @@ emit_relocations (fixP, segment_address_in_file)
|
|||||||
append (&next_object_file_charP, (char *) &ri, sizeof (ri));
|
append (&next_object_file_charP, (char *) &ri, sizeof (ri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
@ -1313,8 +1310,6 @@ s_bss ()
|
|||||||
{
|
{
|
||||||
input_line_pointer++;
|
input_line_pointer++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
@ -466,16 +466,14 @@ s_seg (ignore)
|
|||||||
}
|
}
|
||||||
as_bad ("Unknown segment type");
|
as_bad ("Unknown segment type");
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* s_seg() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
s_data1 ()
|
s_data1 ()
|
||||||
{
|
{
|
||||||
subseg_set (data_section, 1);
|
subseg_set (data_section, 1);
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
return;
|
}
|
||||||
} /* s_data1() */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
s_proc (ignore)
|
s_proc (ignore)
|
||||||
@ -486,8 +484,7 @@ s_proc (ignore)
|
|||||||
++input_line_pointer;
|
++input_line_pointer;
|
||||||
}
|
}
|
||||||
++input_line_pointer;
|
++input_line_pointer;
|
||||||
return;
|
}
|
||||||
} /* s_proc() */
|
|
||||||
|
|
||||||
/* start-sanitize-v9 */
|
/* start-sanitize-v9 */
|
||||||
#ifndef NO_V9
|
#ifndef NO_V9
|
||||||
@ -560,8 +557,6 @@ md_begin ()
|
|||||||
register unsigned int i = 0;
|
register unsigned int i = 0;
|
||||||
|
|
||||||
op_hash = hash_new ();
|
op_hash = hash_new ();
|
||||||
if (op_hash == NULL)
|
|
||||||
as_fatal ("Virtual memory exhausted");
|
|
||||||
|
|
||||||
while (i < NUMOPCODES)
|
while (i < NUMOPCODES)
|
||||||
{
|
{
|
||||||
@ -789,23 +784,30 @@ sparc_ip (str)
|
|||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isdigit (*s))
|
else
|
||||||
{
|
{
|
||||||
|
expressionS exp;
|
||||||
|
char *hold;
|
||||||
char *send;
|
char *send;
|
||||||
|
|
||||||
kmask = strtol (s, &send, 0);
|
hold = input_line_pointer;
|
||||||
if (kmask < 0 || kmask > 127)
|
input_line_pointer = s;
|
||||||
|
expression (&exp);
|
||||||
|
send = input_line_pointer;
|
||||||
|
input_line_pointer = hold;
|
||||||
|
|
||||||
|
kmask = exp.X_add_number;
|
||||||
|
if (exp.X_op != O_constant
|
||||||
|
|| kmask < 0
|
||||||
|
|| kmask > 127)
|
||||||
{
|
{
|
||||||
error_message = ": invalid membar mask number";
|
error_message = ": invalid membar mask number";
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = send;
|
s = send;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
error_message = ": unrecognizable membar mask";
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
opcode |= SIMM13 (kmask);
|
opcode |= SIMM13 (kmask);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1472,6 +1474,8 @@ sparc_ip (str)
|
|||||||
the_insn.reloc = BFD_RELOC_LO10;
|
the_insn.reloc = BFD_RELOC_LO10;
|
||||||
the_insn.exp.X_add_number >>= 32;
|
the_insn.exp.X_add_number >>= 32;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* end-sanitize-v9 */
|
/* end-sanitize-v9 */
|
||||||
@ -1713,8 +1717,7 @@ sparc_ip (str)
|
|||||||
} /* forever looking for a match */
|
} /* forever looking for a match */
|
||||||
|
|
||||||
the_insn.opcode = opcode;
|
the_insn.opcode = opcode;
|
||||||
return;
|
}
|
||||||
} /* sparc_ip() */
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
getExpression (str)
|
getExpression (str)
|
||||||
@ -1819,30 +1822,8 @@ md_number_to_chars (buf, val, n)
|
|||||||
valueT val;
|
valueT val;
|
||||||
int n;
|
int n;
|
||||||
{
|
{
|
||||||
|
number_to_chars_bigendian (buf, val, n);
|
||||||
switch (n)
|
}
|
||||||
{
|
|
||||||
/* start-sanitize-v9 */
|
|
||||||
case 8:
|
|
||||||
*buf++ = val >> 56;
|
|
||||||
*buf++ = val >> 48;
|
|
||||||
*buf++ = val >> 40;
|
|
||||||
*buf++ = val >> 32;
|
|
||||||
/* end-sanitize-v9 */
|
|
||||||
case 4:
|
|
||||||
*buf++ = val >> 24;
|
|
||||||
*buf++ = val >> 16;
|
|
||||||
case 2:
|
|
||||||
*buf++ = val >> 8;
|
|
||||||
case 1:
|
|
||||||
*buf = val;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
as_fatal ("failed sanity check.");
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
} /* md_number_to_chars() */
|
|
||||||
|
|
||||||
/* Apply a fixS to the frags, now that we know the value it ought to
|
/* Apply a fixS to the frags, now that we know the value it ought to
|
||||||
hold. */
|
hold. */
|
||||||
@ -1869,18 +1850,14 @@ md_apply_fix (fixP, value)
|
|||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/* This is a hack. There should be a better way to
|
||||||
* This is a hack. There should be a better way to
|
handle this. Probably in terms of howto fields, once
|
||||||
* handle this.
|
we can look at these fixups in terms of howtos. */
|
||||||
*/
|
|
||||||
if (fixP->fx_r_type == BFD_RELOC_32_PCREL_S2 && fixP->fx_addsy)
|
if (fixP->fx_r_type == BFD_RELOC_32_PCREL_S2 && fixP->fx_addsy)
|
||||||
{
|
val += fixP->fx_where + fixP->fx_frag->fr_address;
|
||||||
val += fixP->fx_where + fixP->fx_frag->fr_address;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (fixP->fx_r_type)
|
switch (fixP->fx_r_type)
|
||||||
{
|
{
|
||||||
|
|
||||||
case BFD_RELOC_16:
|
case BFD_RELOC_16:
|
||||||
buf[0] = val >> 8;
|
buf[0] = val >> 8;
|
||||||
buf[1] = val;
|
buf[1] = val;
|
||||||
@ -2051,18 +2028,6 @@ md_apply_fix (fixP, value)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* should never be called for sparc */
|
|
||||||
void
|
|
||||||
md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
|
||||||
char *ptr;
|
|
||||||
addressT from_addr;
|
|
||||||
addressT to_addr;
|
|
||||||
fragS *frag;
|
|
||||||
symbolS *to_symbol;
|
|
||||||
{
|
|
||||||
as_fatal ("sparc_create_short_jmp\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Translate internal representation of relocation info to BFD target
|
/* Translate internal representation of relocation info to BFD target
|
||||||
format. */
|
format. */
|
||||||
arelent *
|
arelent *
|
||||||
@ -2078,24 +2043,6 @@ tc_gen_reloc (section, fixp)
|
|||||||
|
|
||||||
reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
|
reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;
|
||||||
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
|
reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
|
||||||
reloc->addend = 0;
|
|
||||||
if (fixp->fx_pcrel == 0)
|
|
||||||
reloc->addend += fixp->fx_addnumber;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
reloc->addend += fixp->fx_offset;
|
|
||||||
switch (OUTPUT_FLAVOR)
|
|
||||||
{
|
|
||||||
case bfd_target_elf_flavour:
|
|
||||||
break;
|
|
||||||
case bfd_target_aout_flavour:
|
|
||||||
reloc->addend -= reloc->address;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* What's a good default here? Is there any?? */
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (fixp->fx_r_type)
|
switch (fixp->fx_r_type)
|
||||||
{
|
{
|
||||||
@ -2124,30 +2071,19 @@ tc_gen_reloc (section, fixp)
|
|||||||
}
|
}
|
||||||
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
|
reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
|
||||||
assert (reloc->howto != 0);
|
assert (reloc->howto != 0);
|
||||||
|
assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);
|
||||||
|
|
||||||
|
/* @@ Why fx_addnumber sometimes and fx_offset other times? */
|
||||||
|
if (reloc->howto->pc_relative == 0)
|
||||||
|
reloc->addend = fixp->fx_addnumber;
|
||||||
|
else if (reloc->howto->pcrel_offset)
|
||||||
|
reloc->addend = fixp->fx_offset - reloc->address;
|
||||||
|
else
|
||||||
|
reloc->addend = fixp->fx_offset;
|
||||||
|
|
||||||
return reloc;
|
return reloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* should never be called for sparc */
|
|
||||||
void
|
|
||||||
md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol)
|
|
||||||
char *ptr;
|
|
||||||
addressT from_addr, to_addr;
|
|
||||||
fragS *frag;
|
|
||||||
symbolS *to_symbol;
|
|
||||||
{
|
|
||||||
as_fatal ("sparc_create_long_jump\n");
|
|
||||||
} /* md_create_long_jump() */
|
|
||||||
|
|
||||||
/* should never be called for sparc */
|
|
||||||
int
|
|
||||||
md_estimate_size_before_relax (fragP, segtype)
|
|
||||||
fragS *fragP;
|
|
||||||
segT segtype;
|
|
||||||
{
|
|
||||||
as_fatal ("sparc_estimate_size_before_relax\n");
|
|
||||||
return (1);
|
|
||||||
} /* md_estimate_size_before_relax() */
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* for debugging only */
|
/* for debugging only */
|
||||||
@ -2155,8 +2091,7 @@ static void
|
|||||||
print_insn (insn)
|
print_insn (insn)
|
||||||
struct sparc_it *insn;
|
struct sparc_it *insn;
|
||||||
{
|
{
|
||||||
char *Reloc[] =
|
const char *const Reloc[] = {
|
||||||
{
|
|
||||||
"RELOC_8",
|
"RELOC_8",
|
||||||
"RELOC_16",
|
"RELOC_16",
|
||||||
"RELOC_32",
|
"RELOC_32",
|
||||||
@ -2185,9 +2120,7 @@ print_insn (insn)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (insn->error)
|
if (insn->error)
|
||||||
{
|
fprintf (stderr, "ERROR: %s\n");
|
||||||
fprintf (stderr, "ERROR: %s\n");
|
|
||||||
}
|
|
||||||
fprintf (stderr, "opcode=0x%08x\n", insn->opcode);
|
fprintf (stderr, "opcode=0x%08x\n", insn->opcode);
|
||||||
fprintf (stderr, "reloc = %s\n", Reloc[insn->reloc]);
|
fprintf (stderr, "reloc = %s\n", Reloc[insn->reloc]);
|
||||||
fprintf (stderr, "exp = {\n");
|
fprintf (stderr, "exp = {\n");
|
||||||
@ -2206,9 +2139,7 @@ print_insn (insn)
|
|||||||
fprintf (stderr, "\t\tX_add_number = %d\n",
|
fprintf (stderr, "\t\tX_add_number = %d\n",
|
||||||
insn->exp.X_add_number);
|
insn->exp.X_add_number);
|
||||||
fprintf (stderr, "}\n");
|
fprintf (stderr, "}\n");
|
||||||
return;
|
}
|
||||||
} /* print_insn() */
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -358,24 +358,15 @@ md_begin ()
|
|||||||
char *errorval = 0;
|
char *errorval = 0;
|
||||||
int synthetic_too = 1; /* If 0, just use real opcodes. */
|
int synthetic_too = 1; /* If 0, just use real opcodes. */
|
||||||
|
|
||||||
if ((op_hash = hash_new ()))
|
op_hash = hash_new ();
|
||||||
{
|
|
||||||
for (tP = totstrs; *tP->name && !*errorval; tP++)
|
for (tP = totstrs; *tP->name && !errorval; tP++)
|
||||||
{
|
errorval = hash_insert (op_hash, tP->name, &tP->detail);
|
||||||
errorval = hash_insert (op_hash, tP->name, &tP->detail);
|
|
||||||
}
|
if (synthetic_too)
|
||||||
if (synthetic_too)
|
for (tP = synthetic_totstrs; *tP->name && !errorval; tP++)
|
||||||
{
|
errorval = hash_insert (op_hash, tP->name, &tP->detail);
|
||||||
for (tP = synthetic_totstrs; *tP->name && !*errorval; tP++)
|
|
||||||
{
|
|
||||||
errorval = hash_insert (op_hash, tP->name, &tP->detail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errorval = "Virtual memory exceeded";
|
|
||||||
}
|
|
||||||
if (errorval)
|
if (errorval)
|
||||||
as_fatal (errorval);
|
as_fatal (errorval);
|
||||||
}
|
}
|
||||||
@ -383,7 +374,7 @@ md_begin ()
|
|||||||
void
|
void
|
||||||
md_end ()
|
md_end ()
|
||||||
{
|
{
|
||||||
} /* md_end */
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
md_parse_option (argP, cntP, vecP)
|
md_parse_option (argP, cntP, vecP)
|
||||||
@ -480,11 +471,9 @@ tc_apply_fix (fixP, val)
|
|||||||
fixS *fixP;
|
fixS *fixP;
|
||||||
long val;
|
long val;
|
||||||
{
|
{
|
||||||
/* char *place = fixP->fx_where + fixP->fx_frag->fr_literal; */
|
|
||||||
/* should never be called */
|
/* should never be called */
|
||||||
know (0);
|
know (0);
|
||||||
return;
|
}
|
||||||
} /* tc_apply_fix() */
|
|
||||||
|
|
||||||
void /* Knows about order of bytes in address. */
|
void /* Knows about order of bytes in address. */
|
||||||
md_number_to_disp (con, value, nbytes)
|
md_number_to_disp (con, value, nbytes)
|
||||||
@ -574,9 +563,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
|
|||||||
? 2
|
? 2
|
||||||
: 42)))) << 5) & 0x60)
|
: 42)))) << 5) & 0x60)
|
||||||
| ((!S_IS_DEFINED (fixP->fx_addsy) << 4) & 0x10));
|
| ((!S_IS_DEFINED (fixP->fx_addsy) << 4) & 0x10));
|
||||||
|
}
|
||||||
return;
|
|
||||||
} /* tc_aout_fix_to_chars() */
|
|
||||||
|
|
||||||
/* Relocate byte stuff */
|
/* Relocate byte stuff */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user