Back to index

cell-binutils  2.17cvs20070401
Functions | Variables
tc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * md_atof (int, char *, int *)
int md_parse_option (int, char *)
void md_show_usage (FILE *)
void md_assemble (char *)
void md_begin (void)
void md_number_to_chars (char *, valueT, int)
void md_apply_fix (fixS *, valueT *, segT)
void md_create_long_jump (char *, addressT, addressT, fragS *, symbolS *)
void md_create_short_jump (char *, addressT, addressT, fragS *, symbolS *)
long md_pcrel_from (fixS *)
void md_operand (expressionS *)
int md_estimate_size_before_relax (fragS *fragP, segT)
valueT md_section_align (segT, valueT)
symbolS * md_undefined_symbol (char *)
void md_convert_frag (bfd *, segT, fragS *)
arelenttc_gen_reloc (asection *, fixS *)

Variables

const pseudo_typeS md_pseudo_table []
int md_short_jump_size
int md_long_jump_size

Function Documentation

void md_apply_fix ( fixS *  ,
valueT ,
segT   
)
void md_assemble ( char *  )

Definition at line 4978 of file tc-alpha.c.

{
  /* Current maximum is 13.  */
  char opname[32];
  expressionS tok[MAX_INSN_ARGS];
  int ntok, trunclen;
  size_t opnamelen;

  /* Split off the opcode.  */
  opnamelen = strspn (str, "abcdefghijklmnopqrstuvwxyz_/46819");
  trunclen = (opnamelen < sizeof (opname) - 1
             ? opnamelen
             : sizeof (opname) - 1);
  memcpy (opname, str, trunclen);
  opname[trunclen] = '\0';

  /* Tokenize the rest of the line.  */
  if ((ntok = tokenize_arguments (str + opnamelen, tok, MAX_INSN_ARGS)) < 0)
    {
      if (ntok != TOKENIZE_ERROR_REPORT)
       as_bad (_("syntax error"));

      return;
    }

  /* Finish it off.  */
  assemble_tokens (opname, tok, ntok, alpha_macros_on);
}

Here is the caller graph for this function:

char* md_atof ( int  ,
char *  ,
int  
)

Definition at line 392 of file atof-vax.c.

{
  LITTLENUM_TYPE words[MAXIMUM_NUMBER_OF_LITTLENUMS];
  char kind_of_float;
  int number_of_chars;
  LITTLENUM_TYPE *littlenumP;

  switch (what_statement_type)
    {
    case 'F':
    case 'f':
      kind_of_float = 'f';
      break;

    case 'D':
    case 'd':
      kind_of_float = 'd';
      break;

    case 'g':
      kind_of_float = 'g';
      break;

    case 'h':
      kind_of_float = 'h';
      break;

    default:
      kind_of_float = 0;
      break;
    };

  if (kind_of_float)
    {
      LITTLENUM_TYPE *limit;

      input_line_pointer = atof_vax (input_line_pointer,
                                 kind_of_float,
                                 words);
      /* The atof_vax() builds up 16-bit numbers.
         Since the assembler may not be running on
         a little-endian machine, be very careful about
         converting words to chars.  */
      number_of_chars = atof_vax_sizeof (kind_of_float);
      know (number_of_chars <= MAXIMUM_NUMBER_OF_LITTLENUMS * sizeof (LITTLENUM_TYPE));
      limit = words + (number_of_chars / sizeof (LITTLENUM_TYPE));
      for (littlenumP = words; littlenumP < limit; littlenumP++)
       {
         md_number_to_chars (literalP, *littlenumP, sizeof (LITTLENUM_TYPE));
         literalP += sizeof (LITTLENUM_TYPE);
       };
    }
  else
    number_of_chars = 0;

  *sizeP = number_of_chars;
  return kind_of_float ? NULL : _("Bad call to md_atof()");
}

Here is the call graph for this function:

void md_begin ( void  )

Definition at line 4856 of file tc-alpha.c.

{
  unsigned int i;

  /* Verify that X_op field is wide enough.  */
  {
    expressionS e;

    e.X_op = O_max;
    assert (e.X_op == O_max);
  }

  /* Create the opcode hash table.  */
  alpha_opcode_hash = hash_new ();

  for (i = 0; i < alpha_num_opcodes;)
    {
      const char *name, *retval, *slash;

      name = alpha_opcodes[i].name;
      retval = hash_insert (alpha_opcode_hash, name, (void *) &alpha_opcodes[i]);
      if (retval)
       as_fatal (_("internal error: can't hash opcode `%s': %s"),
                name, retval);

      /* Some opcodes include modifiers of various sorts with a "/mod"
        syntax, like the architecture manual suggests.  However, for
        use with gcc at least, we also need access to those same opcodes
        without the "/".  */

      if ((slash = strchr (name, '/')) != NULL)
       {
         char *p = xmalloc (strlen (name));

         memcpy (p, name, slash - name);
         strcpy (p + (slash - name), slash + 1);

         (void) hash_insert (alpha_opcode_hash, p, (void *) &alpha_opcodes[i]);
         /* Ignore failures -- the opcode table does duplicate some
            variants in different forms, like "hw_stq" and "hw_st/q".  */
       }

      while (++i < alpha_num_opcodes
            && (alpha_opcodes[i].name == name
               || !strcmp (alpha_opcodes[i].name, name)))
       continue;
    }

  /* Create the macro hash table.  */
  alpha_macro_hash = hash_new ();

  for (i = 0; i < alpha_num_macros;)
    {
      const char *name, *retval;

      name = alpha_macros[i].name;
      retval = hash_insert (alpha_macro_hash, name, (void *) &alpha_macros[i]);
      if (retval)
       as_fatal (_("internal error: can't hash macro `%s': %s"),
                name, retval);

      while (++i < alpha_num_macros
            && (alpha_macros[i].name == name
               || !strcmp (alpha_macros[i].name, name)))
       continue;
    }

  /* Construct symbols for each of the registers.  */
  for (i = 0; i < 32; ++i)
    {
      char name[4];

      sprintf (name, "$%d", i);
      alpha_register_table[i] = symbol_create (name, reg_section, i,
                                          &zero_address_frag);
    }

  for (; i < 64; ++i)
    {
      char name[5];

      sprintf (name, "$f%d", i - 32);
      alpha_register_table[i] = symbol_create (name, reg_section, i,
                                          &zero_address_frag);
    }

  /* Create the special symbols and sections we'll be using.  */

  /* So .sbss will get used for tiny objects.  */
  bfd_set_gp_size (stdoutput, g_switch_value);

#ifdef OBJ_ECOFF
  create_literal_section (".lita", &alpha_lita_section, &alpha_lita_symbol);

  /* For handling the GP, create a symbol that won't be output in the
     symbol table.  We'll edit it out of relocs later.  */
  alpha_gp_symbol = symbol_create ("<GP value>", alpha_lita_section, 0x8000,
                               &zero_address_frag);
#endif

#ifdef OBJ_EVAX
  create_literal_section (".link", &alpha_link_section, &alpha_link_symbol);
#endif

#ifdef OBJ_ELF
  if (ECOFF_DEBUGGING)
    {
      segT sec = subseg_new (".mdebug", (subsegT) 0);
      bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY);
      bfd_set_section_alignment (stdoutput, sec, 3);
    }
#endif

  /* Create literal lookup hash table.  */
  alpha_literal_hash = hash_new ();

  subseg_set (text_section, 0);
}
void md_convert_frag ( bfd ,
segT  ,
fragS *   
)
void md_create_long_jump ( char *  ,
addressT  ,
addressT  ,
fragS *  ,
symbolS *   
)
void md_create_short_jump ( char *  ,
addressT  ,
addressT  ,
fragS *  ,
symbolS *   
)
int md_estimate_size_before_relax ( fragS *  fragP,
segT   
)

Definition at line 622 of file tc-cris.c.

{
  int old_fr_fix;
  symbolS *symbolP = fragP->fr_symbol;

#define HANDLE_RELAXABLE(state)                                       \
    case ENCODE_RELAX (state, STATE_UNDF):                            \
      if (symbolP != NULL                                      \
         && S_GET_SEGMENT (symbolP) == segment_type                   \
         && !S_IS_WEAK (symbolP))                              \
       /* The symbol lies in the same segment - a relaxable           \
          case.  */                                            \
       fragP->fr_subtype                                       \
         = ENCODE_RELAX (state, STATE_BYTE);                          \
      else                                                     \
       /* Unknown or not the same segment, so not relaxable.  */      \
       fragP->fr_subtype                                       \
         = ENCODE_RELAX (state, STATE_DWORD);                         \
      fragP->fr_var                                            \
       = md_cris_relax_table[fragP->fr_subtype].rlx_length;           \
      break

  old_fr_fix = fragP->fr_fix;

  switch (fragP->fr_subtype)
    {
      HANDLE_RELAXABLE (STATE_COND_BRANCH);
      HANDLE_RELAXABLE (STATE_COND_BRANCH_V32);
      HANDLE_RELAXABLE (STATE_COND_BRANCH_COMMON);
      HANDLE_RELAXABLE (STATE_COND_BRANCH_PIC);
      HANDLE_RELAXABLE (STATE_ABS_BRANCH_V32);

    case ENCODE_RELAX (STATE_LAPC, STATE_UNDF):
      if (symbolP != NULL
         && S_GET_SEGMENT (symbolP) == segment_type
         && !S_IS_WEAK (symbolP))
       {
         /* The symbol lies in the same segment - a relaxable case.
            Check if we currently have an odd offset; we can't code
            that into the instruction.  Relaxing presumably only cause
            multiple-of-two changes, so we should only need to adjust
            for that here.  */
         bfd_vma target_address
           = (symbolP
              ? S_GET_VALUE (symbolP)
              : 0) + fragP->fr_offset;
         bfd_vma var_part_offset = fragP->fr_fix;
         bfd_vma address_of_var_part = fragP->fr_address + var_part_offset;
         long offset = target_address - (address_of_var_part - 2);

         fragP->fr_subtype
           = (offset & 1)
           ? ENCODE_RELAX (STATE_LAPC, STATE_DWORD)
           : ENCODE_RELAX (STATE_LAPC, STATE_BYTE);
       }
      else
       /* Unknown or not the same segment, so not relaxable.  */
       fragP->fr_subtype
         = ENCODE_RELAX (STATE_LAPC, STATE_DWORD);
      fragP->fr_var
       = md_cris_relax_table[fragP->fr_subtype].rlx_length;
      break;

    case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_UNDF):
      /* Note that we can not do anything sane with relaxing
        [rX + a_known_symbol_in_text], it will have to be a 32-bit
        value.

        We could play tricks with managing a constant pool and make
        a_known_symbol_in_text a "bdap [pc + offset]" pointing there
        (like the GOT for ELF shared libraries), but that's no use, it
        would in general be no shorter or faster code, only more
        complicated.  */

      if (S_GET_SEGMENT (symbolP) != absolute_section)
       {
         /* Go for dword if not absolute or same segment.  */
         fragP->fr_subtype
           = ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_DWORD);
         fragP->fr_var = md_cris_relax_table[fragP->fr_subtype].rlx_length;
       }
      else if (!symbol_resolved_p (fragP->fr_symbol))
       {
         /* The symbol will eventually be completely resolved as an
            absolute expression, but right now it depends on the result
            of relaxation and we don't know anything else about the
            value.  We start relaxation with the assumption that it'll
            fit in a byte.  */
         fragP->fr_subtype
           = ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_BYTE);
         fragP->fr_var = md_cris_relax_table[fragP->fr_subtype].rlx_length;
       }
      else
       {
         /* Absolute expression.  */
         long int value;
         value = (symbolP != NULL
                 ? S_GET_VALUE (symbolP) : 0) + fragP->fr_offset;

         if (value >= -128 && value <= 127)
           {
             /* Byte displacement.  */
             (fragP->fr_opcode)[0] = value;
           }
         else
           {
             /* Word or dword displacement.  */
             int pow2_of_size = 1;
             char *writep;

             if (value < -32768 || value > 32767)
              {
                /* Outside word range, make it a dword.  */
                pow2_of_size = 2;
              }

             /* Modify the byte-offset BDAP into a word or dword offset
               BDAP. Or really, a BDAP rX,8bit into a
               BDAP.[wd] rX,[PC+] followed by a word or dword.  */
             (fragP->fr_opcode)[0] = BDAP_PC_LOW + pow2_of_size * 16;

             /* Keep the register number in the highest four bits.  */
             (fragP->fr_opcode)[1] &= 0xF0;
             (fragP->fr_opcode)[1] |= BDAP_INCR_HIGH;

             /* It grew by two or four bytes.  */
             fragP->fr_fix += 1 << pow2_of_size;
             writep = fragP->fr_literal + old_fr_fix;
             md_number_to_chars (writep, value, 1 << pow2_of_size);
           }
         frag_wane (fragP);
       }
      break;

    case ENCODE_RELAX (STATE_COND_BRANCH, STATE_BYTE):
    case ENCODE_RELAX (STATE_COND_BRANCH, STATE_WORD):
    case ENCODE_RELAX (STATE_COND_BRANCH, STATE_DWORD):
    case ENCODE_RELAX (STATE_COND_BRANCH_PIC, STATE_BYTE):
    case ENCODE_RELAX (STATE_COND_BRANCH_PIC, STATE_WORD):
    case ENCODE_RELAX (STATE_COND_BRANCH_PIC, STATE_DWORD):
    case ENCODE_RELAX (STATE_COND_BRANCH_V32, STATE_BYTE):
    case ENCODE_RELAX (STATE_COND_BRANCH_V32, STATE_WORD):
    case ENCODE_RELAX (STATE_COND_BRANCH_V32, STATE_DWORD):
    case ENCODE_RELAX (STATE_COND_BRANCH_COMMON, STATE_BYTE):
    case ENCODE_RELAX (STATE_COND_BRANCH_COMMON, STATE_WORD):
    case ENCODE_RELAX (STATE_COND_BRANCH_COMMON, STATE_DWORD):
    case ENCODE_RELAX (STATE_ABS_BRANCH_V32, STATE_BYTE):
    case ENCODE_RELAX (STATE_ABS_BRANCH_V32, STATE_WORD):
    case ENCODE_RELAX (STATE_ABS_BRANCH_V32, STATE_DWORD):
    case ENCODE_RELAX (STATE_LAPC, STATE_BYTE):
    case ENCODE_RELAX (STATE_LAPC, STATE_DWORD):
    case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_BYTE):
    case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_WORD):
    case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_DWORD):
      /* When relaxing a section for the second time, we don't need to
        do anything except making sure that fr_var is set right.  */
      fragP->fr_var = md_cris_relax_table[fragP->fr_subtype].rlx_length;
      break;

    case ENCODE_RELAX (STATE_MUL, STATE_BYTE):
      /* Nothing to do here.  */
      break;

    default:
      BAD_CASE (fragP->fr_subtype);
    }

  return fragP->fr_var + (fragP->fr_fix - old_fr_fix);

Here is the call graph for this function:

void md_number_to_chars ( char *  ,
valueT  ,
int   
)

Definition at line 1052 of file tc-arc.c.

Here is the call graph for this function:

void md_operand ( expressionS )

Definition at line 1134 of file tc-arc.c.

{
  char *p = input_line_pointer;

  if (*p != '%')
    return;

  if (strncmp (p, "%st(", 4) == 0)
    {
      input_line_pointer += 4;
      expression (expressionP);
      if (*input_line_pointer != ')')
       {
         as_bad ("missing ')' in %%-op");
         return;
       }
      ++input_line_pointer;
      arc_code_symbol (expressionP);
    }
  else
    {
      /* It could be a register.  */
      int i, l;
      struct arc_ext_operand_value *ext_oper = arc_ext_operands;
      p++;

      while (ext_oper)
       {
         l = strlen (ext_oper->operand.name);
         if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
           {
             input_line_pointer += l + 1;
             expressionP->X_op = O_register;
             expressionP->X_add_number = (offsetT) &ext_oper->operand;
             return;
           }
         ext_oper = ext_oper->next;
       }
      for (i = 0; i < arc_reg_names_count; i++)
       {
         l = strlen (arc_reg_names[i].name);
         if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
           {
             input_line_pointer += l + 1;
             expressionP->X_op = O_register;
             expressionP->X_add_number = (offsetT) &arc_reg_names[i];
             break;
           }
       }
    }
}

Here is the call graph for this function:

int md_parse_option ( int  ,
char *   
)
long md_pcrel_from ( fixS *  )

Definition at line 5181 of file tc-alpha.c.

{
  valueT addr = fixP->fx_where + fixP->fx_frag->fr_address;

  switch (fixP->fx_r_type)
    {
    case BFD_RELOC_23_PCREL_S2:
    case BFD_RELOC_ALPHA_HINT:
    case BFD_RELOC_ALPHA_BRSGP:
      return addr + 4;
    default:
      return addr;
    }
}

Here is the call graph for this function:

void md_show_usage ( FILE *  )

Definition at line 5157 of file tc-alpha.c.

{
  fputs (_("\
Alpha options:\n\
-32addr                     treat addresses as 32-bit values\n\
-F                   lack floating point instructions support\n\
-mev4 | -mev45 | -mev5 | -mev56 | -mpca56 | -mev6 | -mev67 | -mev68 | -mall\n\
                     specify variant of Alpha architecture\n\
-m21064 | -m21066 | -m21164 | -m21164a | -m21164pc | -m21264 | -m21264a | -m21264b\n\
                     these variants include PALcode opcodes\n"),
       stream);
#ifdef OBJ_EVAX
  fputs (_("\
VMS options:\n\
-+                   hash encode (don't truncate) names longer than 64 characters\n\
-H                   show new symbol after hash truncation\n"),
       stream);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

symbolS* md_undefined_symbol ( char *  )

Definition at line 5387 of file tc-alpha.c.

{
  if (*name == '$')
    {
      int is_float = 0, num;

      switch (*++name)
       {
       case 'f':
         if (name[1] == 'p' && name[2] == '\0')
           return alpha_register_table[AXP_REG_FP];
         is_float = 32;
         /* Fall through.  */

       case 'r':
         if (!ISDIGIT (*++name))
           break;
         /* Fall through.  */

       case '0': case '1': case '2': case '3': case '4':
       case '5': case '6': case '7': case '8': case '9':
         if (name[1] == '\0')
           num = name[0] - '0';
         else if (name[0] != '0' && ISDIGIT (name[1]) && name[2] == '\0')
           {
             num = (name[0] - '0') * 10 + name[1] - '0';
             if (num >= 32)
              break;
           }
         else
           break;

         if (!alpha_noat_on && (num + is_float) == AXP_REG_AT)
           as_warn (_("Used $at without \".set noat\""));
         return alpha_register_table[num + is_float];

       case 'a':
         if (name[1] == 't' && name[2] == '\0')
           {
             if (!alpha_noat_on)
              as_warn (_("Used $at without \".set noat\""));
             return alpha_register_table[AXP_REG_AT];
           }
         break;

       case 'g':
         if (name[1] == 'p' && name[2] == '\0')
           return alpha_register_table[alpha_gp_register];
         break;

       case 's':
         if (name[1] == 'p' && name[2] == '\0')
           return alpha_register_table[AXP_REG_SP];
         break;
       }
    }
  return NULL;
}

Here is the call graph for this function:

arelent* tc_gen_reloc ( asection ,
fixS *   
)

Definition at line 1407 of file tc-hppa.c.

{
  arelent *reloc;
  struct hppa_fix_struct *hppa_fixp;
  static arelent *no_relocs = NULL;
  arelent **relocs;
  reloc_type **codes;
  reloc_type code;
  int n_relocs;
  int i;

  hppa_fixp = (struct hppa_fix_struct *) fixp->tc_fix_data;
  if (fixp->fx_addsy == 0)
    return &no_relocs;

  assert (hppa_fixp != 0);
  assert (section != 0);

  reloc = xmalloc (sizeof (arelent));

  reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
  *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
  codes = hppa_gen_reloc_type (stdoutput,
                            fixp->fx_r_type,
                            hppa_fixp->fx_r_format,
                            hppa_fixp->fx_r_field,
                            fixp->fx_subsy != NULL,
                            symbol_get_bfdsym (fixp->fx_addsy));

  if (codes == NULL)
    {
      as_bad_where (fixp->fx_file, fixp->fx_line, _("Cannot handle fixup"));
      abort ();
    }

  for (n_relocs = 0; codes[n_relocs]; n_relocs++)
    ;

  relocs = xmalloc (sizeof (arelent *) * n_relocs + 1);
  reloc = xmalloc (sizeof (arelent) * n_relocs);
  for (i = 0; i < n_relocs; i++)
    relocs[i] = &reloc[i];

  relocs[n_relocs] = NULL;

#ifdef OBJ_ELF
  switch (fixp->fx_r_type)
    {
    default:
      assert (n_relocs == 1);

      code = *codes[0];

      /* Now, do any processing that is dependent on the relocation type.  */
      switch (code)
       {
       case R_PARISC_DLTREL21L:
       case R_PARISC_DLTREL14R:
       case R_PARISC_DLTREL14F:
       case R_PARISC_PLABEL32:
       case R_PARISC_PLABEL21L:
       case R_PARISC_PLABEL14R:
         /* For plabel relocations, the addend of the
            relocation should be either 0 (no static link) or 2
            (static link required).  This adjustment is done in
            bfd/elf32-hppa.c:elf32_hppa_relocate_section.

            We also slam a zero addend into the DLT relative relocs;
            it doesn't make a lot of sense to use any addend since
            it gets you a different (eg unknown) DLT entry.  */
         reloc->addend = 0;
         break;

#ifdef ELF_ARG_RELOC
       case R_PARISC_PCREL17R:
       case R_PARISC_PCREL17F:
       case R_PARISC_PCREL17C:
       case R_PARISC_DIR17R:
       case R_PARISC_DIR17F:
       case R_PARISC_PCREL21L:
       case R_PARISC_DIR21L:
         reloc->addend = HPPA_R_ADDEND (hppa_fixp->fx_arg_reloc,
                                    fixp->fx_offset);
         break;
#endif

       case R_PARISC_DIR32:
         /* Facilitate hand-crafted unwind info.  */
         if (strcmp (section->name, UNWIND_SECTION_NAME) == 0)
           code = R_PARISC_SEGREL32;
         /* Fall thru */

       default:
         reloc->addend = fixp->fx_offset;
         break;
       }

      reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
      *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
      reloc->howto = bfd_reloc_type_lookup (stdoutput,
                                       (bfd_reloc_code_real_type) code);
      reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;

      assert (reloc->howto && (unsigned int) code == reloc->howto->type);
      break;
    }
#else /* OBJ_SOM */

  /* Walk over reach relocation returned by the BFD backend.  */
  for (i = 0; i < n_relocs; i++)
    {
      code = *codes[i];

      relocs[i]->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
      *relocs[i]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
      relocs[i]->howto =
       bfd_reloc_type_lookup (stdoutput,
                            (bfd_reloc_code_real_type) code);
      relocs[i]->address = fixp->fx_frag->fr_address + fixp->fx_where;

      switch (code)
       {
       case R_COMP2:
         /* The only time we ever use a R_COMP2 fixup is for the difference
            of two symbols.  With that in mind we fill in all four
            relocs now and break out of the loop.  */
         assert (i == 1);
         relocs[0]->sym_ptr_ptr
           = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr;
         relocs[0]->howto
           = bfd_reloc_type_lookup (stdoutput,
                                 (bfd_reloc_code_real_type) *codes[0]);
         relocs[0]->address = fixp->fx_frag->fr_address + fixp->fx_where;
         relocs[0]->addend = 0;
         relocs[1]->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
         *relocs[1]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
         relocs[1]->howto
           = bfd_reloc_type_lookup (stdoutput,
                                 (bfd_reloc_code_real_type) *codes[1]);
         relocs[1]->address = fixp->fx_frag->fr_address + fixp->fx_where;
         relocs[1]->addend = 0;
         relocs[2]->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
         *relocs[2]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
         relocs[2]->howto
           = bfd_reloc_type_lookup (stdoutput,
                                 (bfd_reloc_code_real_type) *codes[2]);
         relocs[2]->address = fixp->fx_frag->fr_address + fixp->fx_where;
         relocs[2]->addend = 0;
         relocs[3]->sym_ptr_ptr
           = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr;
         relocs[3]->howto
           = bfd_reloc_type_lookup (stdoutput,
                                 (bfd_reloc_code_real_type) *codes[3]);
         relocs[3]->address = fixp->fx_frag->fr_address + fixp->fx_where;
         relocs[3]->addend = 0;
         relocs[4]->sym_ptr_ptr
           = (asymbol **) bfd_abs_section_ptr->symbol_ptr_ptr;
         relocs[4]->howto
           = bfd_reloc_type_lookup (stdoutput,
                                 (bfd_reloc_code_real_type) *codes[4]);
         relocs[4]->address = fixp->fx_frag->fr_address + fixp->fx_where;
         relocs[4]->addend = 0;
         goto done;
       case R_PCREL_CALL:
       case R_ABS_CALL:
         relocs[i]->addend = HPPA_R_ADDEND (hppa_fixp->fx_arg_reloc, 0);
         break;

       case R_DLT_REL:
       case R_DATA_PLABEL:
       case R_CODE_PLABEL:
         /* For plabel relocations, the addend of the
            relocation should be either 0 (no static link) or 2
            (static link required).

            FIXME: We always assume no static link!

            We also slam a zero addend into the DLT relative relocs;
            it doesn't make a lot of sense to use any addend since
            it gets you a different (eg unknown) DLT entry.  */
         relocs[i]->addend = 0;
         break;

       case R_N_MODE:
       case R_S_MODE:
       case R_D_MODE:
       case R_R_MODE:
       case R_FSEL:
       case R_LSEL:
       case R_RSEL:
       case R_BEGIN_BRTAB:
       case R_END_BRTAB:
       case R_BEGIN_TRY:
       case R_N0SEL:
       case R_N1SEL:
         /* There is no symbol or addend associated with these fixups.  */
         relocs[i]->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
         *relocs[i]->sym_ptr_ptr = symbol_get_bfdsym (dummy_symbol);
         relocs[i]->addend = 0;
         break;

       case R_END_TRY:
       case R_ENTRY:
       case R_EXIT:
         /* There is no symbol associated with these fixups.  */
         relocs[i]->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
         *relocs[i]->sym_ptr_ptr = symbol_get_bfdsym (dummy_symbol);
         relocs[i]->addend = fixp->fx_offset;
         break;

       default:
         relocs[i]->addend = fixp->fx_offset;
       }
    }

 done:
#endif

  return relocs;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 454 of file tc-cris.c.

const pseudo_typeS md_pseudo_table[]

Definition at line 4627 of file tc-alpha.c.

Definition at line 446 of file tc-cris.c.