assert (fixp->fx_r_type == BFD_RELOC_MIPS_CALL16);
default: abort (); case BFD_RELOC_MIPS_GOT16: break; case BFD_RELOC_MIPS_CALL16: case BFD_RELOC_MIPS_GOT_LO16: case BFD_RELOC_MIPS_CALL_LO16:
tc_gen_reloc (section, fixp)     asection *section;     fixS *fixp;{  static arelent *retval[4];  arelent *reloc;  reloc = retval[0] = (arelent *) xmalloc (sizeof (arelent));  retval[1] = NULL;  reloc->sym_ptr_ptr = &fixp->fx_addsy->bsym;  reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;  if (mips_pic == EMBEDDED_PIC      && SWITCH_TABLE (fixp))    {      /* For a switch table entry we use a special reloc.  The addend	 is actually the difference between the reloc address and the	 subtrahend.  */      reloc->addend = reloc->address - S_GET_VALUE (fixp->fx_subsy);      if (OUTPUT_FLAVOR != bfd_target_ecoff_flavour)	as_fatal ("Double check fx_r_type in tc-mips.c:tc_gen_reloc");      fixp->fx_r_type = BFD_RELOC_GPREL32;    }  else if (fixp->fx_r_type == BFD_RELOC_PCREL_LO16)    {      /* We use a special addend for an internal RELLO reloc.  */      if (fixp->fx_addsy->bsym->flags & BSF_SECTION_SYM)	reloc->addend = reloc->address - S_GET_VALUE (fixp->fx_subsy);      else	reloc->addend = fixp->fx_addnumber + reloc->address;    }  else if (fixp->fx_r_type == BFD_RELOC_PCREL_HI16_S)    {      assert (fixp->fx_next != NULL	      && fixp->fx_next->fx_r_type == BFD_RELOC_PCREL_LO16);      /* We use a special addend for an internal RELHI reloc.  The	 reloc is relative to the RELLO; adjust the addend	 accordingly.  */      if (fixp->fx_addsy->bsym->flags & BSF_SECTION_SYM)	reloc->addend = (fixp->fx_next->fx_frag->fr_address			 + fixp->fx_next->fx_where			 - S_GET_VALUE (fixp->fx_subsy));      else	reloc->addend = (fixp->fx_addnumber			 + fixp->fx_next->fx_frag->fr_address			 + fixp->fx_next->fx_where);    }  else if (fixp->fx_pcrel == 0)    reloc->addend = fixp->fx_addnumber;  else    {      if (OUTPUT_FLAVOR != bfd_target_aout_flavour)	/* A gruesome hack which is a result of the gruesome gas reloc	   handling.  */	reloc->addend = reloc->address;      else	reloc->addend = -reloc->address;    }  /* If this is a variant frag, we may need to adjust the existing     reloc and generate a new one.  */  if (fixp->fx_frag->fr_opcode != NULL      && (fixp->fx_r_type == BFD_RELOC_MIPS_GPREL	  || fixp->fx_r_type == BFD_RELOC_MIPS_GOT16	  || fixp->fx_r_type == BFD_RELOC_MIPS_CALL16))    {      arelent *reloc2;      /* If this is not the last reloc in this frag, then we have two	 GPREL relocs, both of which are being replaced.  Let the	 second one handle all of them.  */      if (fixp->fx_next != NULL	  && fixp->fx_frag == fixp->fx_next->fx_frag)	{	  assert (fixp->fx_r_type == BFD_RELOC_MIPS_GPREL		  && fixp->fx_next->fx_r_type == BFD_RELOC_MIPS_GPREL);	  retval[0] = NULL;	  return retval;	}      fixp->fx_where = fixp->fx_frag->fr_opcode - fixp->fx_frag->fr_literal;      reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;      reloc2 = retval[1] = (arelent *) xmalloc (sizeof (arelent));      retval[2] = NULL;      reloc2->sym_ptr_ptr = &fixp->fx_addsy->bsym;      reloc2->address = (reloc->address			 + (RELAX_RELOC2 (fixp->fx_frag->fr_subtype)			    - RELAX_RELOC1 (fixp->fx_frag->fr_subtype)));      reloc2->addend = fixp->fx_addnumber;      reloc2->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO16);      assert (reloc2->howto != NULL);      if (RELAX_RELOC3 (fixp->fx_frag->fr_subtype))	{	  arelent *reloc3;	  reloc3 = retval[2] = (arelent *) xmalloc (sizeof (arelent));	  retval[3] = NULL;	  *reloc3 = *reloc2;	  reloc3->address += 4;	}      if (mips_pic == NO_PIC)	{	  assert (fixp->fx_r_type == BFD_RELOC_MIPS_GPREL);	  fixp->fx_r_type = BFD_RELOC_HI16_S;	}      else if (mips_pic == SVR4_PIC)	{	  if (fixp->fx_r_type != BFD_RELOC_MIPS_GOT16)	    {	      assert (fixp->fx_r_type == BFD_RELOC_MIPS_CALL16);	      fixp->fx_r_type = BFD_RELOC_MIPS_GOT16;	    }	}      else	abort ();    }  /* To support a PC relative reloc when generating embedded PIC code     for ECOFF, we use a Cygnus extension.  We check for that here to     make sure that we don't let such a reloc escape normally.  */  if (OUTPUT_FLAVOR == bfd_target_ecoff_flavour      && fixp->fx_r_type == BFD_RELOC_16_PCREL_S2      && mips_pic != EMBEDDED_PIC)    reloc->howto = NULL;  else    reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);  if (reloc->howto == NULL)    {      as_bad_where (fixp->fx_file, fixp->fx_line,		    "Can not represent relocation in this object file format");      retval[0] = NULL;    }  return retval;}