FreeBSD/contrib/binutils/gas/config/tc-mips.c
/* Return true if *STR points to a relocation operator.  When returning true,
   move *STR over the operator and store its relocation code in *RELOC.
   Leave both *STR and *RELOC alone when returning false.  */
Return true if *STR points to a relocation operator.  When returning true,
move *STR over the operator and store its relocation code in *RELOC.
Leave both *STR and *RELOC alone when returning false.
Return true if * STR points to a relocation operator . When returning true move * STR over the operator and store its relocation code in * RELOC . Leave both * STR and * RELOC alone when returning false .
static bfd_boolean
parse_relocation (char **str, bfd_reloc_code_real_type *reloc)
{
  const struct percent_op_match *percent_op;
  size_t limit, i;
  if (mips_opts.mips16)
    {
      percent_op = mips16_percent_op;
      limit = ARRAY_SIZE (mips16_percent_op);
    }
  else
    {
      percent_op = mips_percent_op;
      limit = ARRAY_SIZE (mips_percent_op);
    }
  for (i = 0; i < limit; i++)
    if (strncasecmp (*str, percent_op[i].str, strlen (percent_op[i].str)) == 0)
      {
	int len = strlen (percent_op[i].str);
	if (!ISSPACE ((*str)[len]) && (*str)[len] != '(')
	  continue;
	*str += strlen (percent_op[i].str);
	*reloc = percent_op[i].reloc;
	if (!bfd_reloc_type_lookup (stdoutput, percent_op[i].reloc))
	  {
	    as_bad ("relocation %s isn't supported by the current ABI",
		    percent_op[i].str);
	    *reloc = BFD_RELOC_UNUSED;
	  }
	return TRUE;
      }
  return FALSE;
}
static bfd_boolean parse_relocation ( char * * str , bfd_reloc_code_real_type * reloc ) { const struct percent_op_match * percent_op ; size_t limit , i ; if ( mips_opts . mips16 ) { percent_op = mips16_percent_op ; limit = ARRAY_SIZE ( mips16_percent_op ) ; } else { percent_op = mips_percent_op ; limit = ARRAY_SIZE ( mips_percent_op ) ; } for ( i = 0 ; i < limit ; i ++ ) if ( strncasecmp ( * str , percent_op [ i ] . str , strlen ( percent_op [ i ] . str ) ) == 0 ) { int len = strlen ( percent_op [ i ] . str ) ; if ( ! ISSPACE ( ( * str ) [ len ] ) && ( * str ) [ len ] != ' ' ) continue ; * str += strlen ( percent_op [ i ] . str ) ; * reloc = percent_op [ i ] . reloc ; if ( ! bfd_reloc_type_lookup ( stdoutput , percent_op [ i ] . reloc ) ) { as_bad ( " " , percent_op [ i ] . str ) ; * reloc = BFD_RELOC_UNUSED ; } return TRUE ; } return FALSE ; }
Return true if *STR points to a relocation operator.
Return true if * STR points to a relocation operator .
/* Check whether the output BFD supports this relocation.
	   If not, issue an error and fall back on something safe.  */